fids/flights-domain/docker-compose.yml

41 lines
968 B
YAML

version: '3.8'
services:
flights-api:
container_name: fids_flights_api
image: ${API_IMAGE}
ports:
- 5000: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}@flights-api-db/${POSTGRES_DB}
- APP_SETTINGS=${APP_SETTINGS}
depends_on:
flights-api-db:
condition: service_healthy
flights-api-db:
container_name: fids_flights_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}