cambios en migraciones
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
gitea-db:
|
||||
image: postgres:15
|
||||
container_name: ${DB_CONTAINER_NAME:-django_db_local}
|
||||
# Usará el nombre de tu .env (django_db_local)
|
||||
container_name: ${DB_CONTAINER_NAME:-django_db_dev}
|
||||
restart: always
|
||||
# Solo usamos el .env de esta carpeta
|
||||
env_file: .env
|
||||
environment:
|
||||
- POSTGRES_DB=${DB_NAME}
|
||||
- POSTGRES_USER=${DB_USER}
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME:-gitea}
|
||||
POSTGRES_USER: ${DB_USER:-gitea}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD:-gitea}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
# --- ESTO ES LO QUE FALTA ---
|
||||
ports:
|
||||
- "${DATABASE_EXPOSE_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- local_postgres_data:/var/lib/postgresql/data
|
||||
# ----------------------------
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-gitea} -d ${DB_NAME:-gitea}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -25,18 +28,18 @@ services:
|
||||
dockerfile: deployments/Dockerfile
|
||||
container_name: ${APP_CONTAINER_NAME:-django_app_dev}
|
||||
restart: always
|
||||
volumes:
|
||||
- ..:/app
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DEBUG=${DEBUG_MODE:-1}
|
||||
# IMPORTANTE: Este nombre debe coincidir con el nombre del servicio arriba (gitea-db)
|
||||
- DB_HOST=gitea-db
|
||||
- DB_PORT=5432
|
||||
ports:
|
||||
- "${PORT:-8000}:8000"
|
||||
# Inyectamos el .env local al contenedor web
|
||||
env_file: .env
|
||||
environment:
|
||||
- DB_HOST=db
|
||||
- DB_PORT=5432
|
||||
depends_on:
|
||||
db:
|
||||
gitea-db:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
local_postgres_data:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user