Files
HospitalAssistantBackend/docker-compose.yml
2025-10-16 16:43:18 +03:00

51 lines
1.1 KiB
YAML

name: HospitalAssistantAPI
x-app-common: &app-common
build:
context: .
target: production
tty: true
restart: unless-stopped
stop_signal: SIGINT
env_file:
- .test.env
environment:
DATABASE_URL: "postgresql://postgres:example@db:5432/postgres"
REDIS_URL: "redis://valkey:6379/0"
volumes:
# - "./container/certt.cer:/var/opt/cprocsp/keys/cert.cer"
- "./container/test.cer:/var/opt/cprocsp/keys/cert.cer"
- "./container/cont2:/app/cont"
services:
valkey:
image: valkey/valkey:alpine
restart: unless-stopped
ports:
- ${VALKEY_PORT:-6380}:6379
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 10s
retries: 5
db:
image: postgres:17.2-alpine
restart: unless-stopped
ports:
- ${POSTGRES_PORT:-5432}:5432
environment:
POSTGRES_PASSWORD: example
volumes:
- "${POSTGRES_DATA:-./postgres}:/var/lib/postgresql/data/"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 10s
retries: 5
web:
<<: *app-common
ports:
- "${APP_PORT:-6767}:${APP_PORT:-6767}"