Files
boc/iom/docker-compose.staging.yml
T

84 lines
1.9 KiB
YAML
Raw Normal View History

version: '3.8'
# Staging environment - production-like testing
services:
postgres:
image: postgis/postgis:15-3.3
container_name: iom-staging-postgres
environment:
POSTGRES_DB: iom_staging
POSTGRES_USER: iom
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-staging_s…}
volumes:
- postgres_staging_data:/var/lib/postgresql/data
- ./database/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
- ./database/seed_staging.sql:/docker-entrypoint-initdb.d/02-seed.sql
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U iom"]
interval: 10s
timeout: 5s
retries: 5
networks:
- iom-staging-network
redis:
image: redis:7-alpine
container_name: iom-staging-redis
ports:
- "6380:6379"
volumes:
- redis_staging_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- iom-staging-network
api:
build:
context: .
dockerfile: Dockerfile
container_name: iom-staging-api
environment:
DATABASE_URL: postgresql://iom:${POSTGRES_PASSWORD:-staging_s…}@postgres:5432/iom_staging
REDIS_URL: redis://redis:6379/0
JWT_SECRET: ${JWT_SECRET:-staging_jwt_s…}
ENVIRONMENT: staging
LOG_LEVEL: DEBUG
ports:
- "8001:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- iom-staging-network
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: iom-staging-nginx
ports:
- "8080:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- api
networks:
- iom-staging-network
restart: unless-stopped
volumes:
postgres_staging_data:
redis_staging_data:
networks:
iom-staging-network:
driver: bridge