fids/subscription-domain/docker-compose.yml

50 lines
1.1 KiB
YAML

version: '3.8'
services:
subscriptions-api:
container_name: fids_subscriptions_api
image: ${API_IMAGE}
ports:
- 5002:5000
healthcheck:
test: ["CMD", "nc", "-vz", "-w1", "localhost", "5000"]
interval: 2s
timeout: 2s
retries: 5
start_period: 2s
environment:
- TEST_TARGET=${TEST_TARGET}
- PORT=5000
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@subscriptions-api-db/${POSTGRES_DB}
- APP_SETTINGS=${APP_SETTINGS}
- TOKEN=${TOKEN}
depends_on:
subscriptions-api-db:
condition: service_healthy
networks:
- subscriptions
subscriptions-api-db:
container_name: fids_subscriptions_db
build:
context: ./db
dockerfile: Dockerfile
healthcheck:
test: psql postgres --command "select 1" -U ${POSTGRES_USER}
interval: 2s
timeout: 10s
retries: 10
start_period: 2s
expose:
- 5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASS}
networks:
- subscriptions
networks:
subscriptions:
driver: bridge