Files
django-core-base/deployments/docker-compose.yml
minguezsanzjuanjose 02fa6247f1
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
fix: replace external saas_network with named network to auto-create on compose up
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 13:27:06 +02:00

49 lines
1.1 KiB
YAML

version: '3.8'
services:
db:
image: postgres:15-alpine
container_name: ${DB_CONTAINER_NAME:-django_core_db}
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME:-django_core_db}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${DATABASE_EXPOSE_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-django_core_db}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
web:
build:
context: ..
dockerfile: deployments/Dockerfile
container_name: ${APP_CONTAINER_NAME:-django_core_app}
restart: unless-stopped
env_file:
- .env
environment:
- DB_HOST=db
- DB_PORT=5432
ports:
- "${PORT:-8000}:8000"
depends_on:
db:
condition: service_healthy
networks:
- default
- saas_network
volumes:
postgres_data:
networks:
saas_network:
name: saas_network