35 lines
851 B
YAML
35 lines
851 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
auth-api:
|
|
image: ${API_IMAGE}
|
|
container_name: fids-auth_auth-api
|
|
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}@auth-db/${POSTGRES_DB}
|
|
- APP_SETTINGS=${APP_SETTINGS}
|
|
|
|
auth-db:
|
|
build:
|
|
context: ./db
|
|
dockerfile: Dockerfile
|
|
container_name: fids-auth_auth-db
|
|
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}
|