|
| 1 | +services: |
| 2 | + cape-db: |
| 3 | + image: postgres:bookworm |
| 4 | + hostname: cape-db |
| 5 | + restart: unless-stopped |
| 6 | + ports: |
| 7 | + - "127.0.0.1:${PG_PORT:-5432}:5432" |
| 8 | + environment: |
| 9 | + POSTGRES_USER: ${POSTGRES_USER:-cape} |
| 10 | + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-cape} |
| 11 | + POSTGRES_DB: ${POSTGRES_DB:-cape} |
| 12 | + PGDATA: /var/lib/postgresql/data/pgdata |
| 13 | + volumes: |
| 14 | + - cape-db-data:/var/lib/postgresql/data |
| 15 | + healthcheck: |
| 16 | + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cape} -d ${POSTGRES_DB:-cape}"] |
| 17 | + interval: 5s |
| 18 | + timeout: 5s |
| 19 | + retries: 10 |
| 20 | + start_period: 30s |
| 21 | + |
| 22 | + mongodb: |
| 23 | + image: mongo:6 |
| 24 | + command: ["--bind_ip_all"] |
| 25 | + volumes: |
| 26 | + - cape-mongo-data:/data/db |
| 27 | + ports: |
| 28 | + - "127.0.0.1:${MONGO_PORT:-27017}:27017" |
| 29 | + restart: unless-stopped |
| 30 | + healthcheck: |
| 31 | + test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 })"] |
| 32 | + interval: 10s |
| 33 | + timeout: 5s |
| 34 | + retries: 12 |
| 35 | + start_period: 20s |
| 36 | + |
| 37 | + cape-server: |
| 38 | + build: |
| 39 | + context: ../ |
| 40 | + dockerfile: docker/Dockerfile |
| 41 | + hostname: cape-server |
| 42 | + restart: unless-stopped |
| 43 | + depends_on: |
| 44 | + cape-db: |
| 45 | + condition: service_healthy |
| 46 | + mongodb: |
| 47 | + condition: service_healthy |
| 48 | + environment: |
| 49 | + - WEB_PORT=${WEB_PORT:-8000} |
| 50 | + - POSTGRES_USER=${POSTGRES_USER:-cape} |
| 51 | + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-cape} |
| 52 | + - POSTGRES_DB=${POSTGRES_DB:-cape} |
| 53 | + ports: |
| 54 | + - "127.0.0.1:${RESULT_PORT:-2042}:2042" # result server |
| 55 | + - "127.0.0.1:${WEB_PORT:-8000}:8000" # web ui |
| 56 | + volumes: |
| 57 | + - ../conf:/cape/conf |
| 58 | + - ../custom/conf:/cape/custom/conf |
| 59 | + - ../custom:/cape/custom |
| 60 | + - ../storage:/cape/storage |
| 61 | + cap_add: |
| 62 | + - NET_ADMIN |
| 63 | + - NET_RAW |
| 64 | + |
| 65 | +volumes: |
| 66 | + cape-db-data: |
| 67 | + cape-mongo-data: |
0 commit comments