Files
conference-room-booking-system/compose.yml
T

71 lines
1.3 KiB
YAML
Raw Normal View History

---
# docker compose file for production environment
2025-08-20 11:23:42 -04:00
services:
backend:
build:
dockerfile: Dockerfile-backend
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
env_file:
- .env
2025-08-20 11:23:42 -04:00
environment:
ENVIRONMENT: production
BACKEND_LOG_LEVEL: warning
DATABASE_HOST: postgres
2025-08-20 11:23:42 -04:00
depends_on:
2025-08-22 19:41:34 -04:00
postgres:
condition: service_healthy
2025-08-20 11:23:42 -04:00
networks:
- app-network
frontend:
build:
dockerfile: Dockerfile-frontend
env_file:
- .env
environment:
FRONTEND_LOG_LEVEL: warning
2025-08-20 11:23:42 -04:00
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
2025-08-20 11:23:42 -04:00
depends_on:
- backend
networks:
- app-network
postgres:
image: postgres:17
2025-08-20 21:01:11 -04:00
expose:
- "${DATABASE_PORT}:${DATABASE_PORT}"
2025-08-20 11:23:42 -04:00
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network
env_file:
- .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
2025-08-22 19:41:34 -04:00
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${DATABASE_USER}",
2025-08-22 19:41:34 -04:00
"-d",
"${DATABASE_NAME}",
2025-08-22 19:41:34 -04:00
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
2025-08-20 11:23:42 -04:00
volumes:
postgres-data:
networks:
app-network:
driver: bridge