# 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