timezoneDB/compose.yml
creations 6bfd298455
# Git Commit Message
refactor: add production features and improve architecture

- Add structured configuration with validation
- Implement Redis connection pooling
- Add database migrations system
- Change API methods: GET /set → POST /set, GET /delete → DELETE /delete
- Add health check endpoint
- Add graceful shutdown and structured logging
- Update frontend for new API methods
- Add open source attribution
2025-06-04 07:56:15 -04:00

55 lines
No EOL
1.2 KiB
YAML

services:
timezone-db:
container_name: timezoneDB
build:
context: .
restart: unless-stopped
ports:
- "${PORT:-3000}:${PORT:-3000}"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
dragonfly:
condition: service_started
networks:
- timezoneDB-network
healthcheck:
test: ["CMD", "curl", "-f", "http://${HOST:-localhost}:${PORT:-3000}/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
PGUSER: postgres
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- timezoneDB-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly
restart: unless-stopped
ulimits:
memlock: -1
volumes:
- ./dragonfly-data:/data
networks:
- timezoneDB-network
networks:
timezoneDB-network:
driver: bridge