db(couchdb): auto-provision databases on startup for production strategy; add TokenService with CouchDB-backed token storage and localStorage fallback; switch OAuth to unified config for client IDs and redirect URI; express Request typing for req.user; align exportAsEnvVars with show-config expectations; remove Vite importmap from index.html; prefer babel-jest over ts-jest; remove duplicate uuid mocking from Jest config
This commit is contained in:
41
docker-compose.ci.yml
Normal file
41
docker-compose.ci.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
# docker-compose file for spinning up a local CouchDB instance used by integration tests
|
||||
#
|
||||
# Usage (locally):
|
||||
# docker compose -f meds/docker-compose.ci.yml up -d couchdb
|
||||
# export VITE_COUCHDB_URL=http://localhost:5984
|
||||
# export VITE_COUCHDB_USER=admin
|
||||
# export VITE_COUCHDB_PASSWORD=password
|
||||
# npm run test:integration
|
||||
#
|
||||
# Notes:
|
||||
# - This compose file is meant for CI and local testing only.
|
||||
# - Credentials default to admin/password (override via env vars).
|
||||
# - Data is persisted in a named volume "couchdb-test-data".
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
couchdb:
|
||||
image: couchdb:3
|
||||
container_name: meds-couchdb-test
|
||||
environment:
|
||||
COUCHDB_USER: ${VITE_COUCHDB_USER:-admin}
|
||||
COUCHDB_PASSWORD: ${VITE_COUCHDB_PASSWORD:-password}
|
||||
# Optional: set a node name (single node)
|
||||
# NODENAME: couchdb@127.0.0.1
|
||||
ports:
|
||||
- '${VITE_COUCHDB_PORT:-5984}:5984'
|
||||
volumes:
|
||||
- couchdb-test-data:/opt/couchdb/data
|
||||
# Healthcheck is optional; curl may not be available in the base image.
|
||||
# If you add curl to the image, uncomment this block to enable depends_on:service_healthy in other services.
|
||||
# healthcheck:
|
||||
# test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:5984/_up || exit 1"]
|
||||
# interval: 5s
|
||||
# timeout: 3s
|
||||
# retries: 20
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
couchdb-test-data:
|
||||
name: couchdb-test-data
|
||||
Reference in New Issue
Block a user