fix
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good

This commit is contained in:
minguezsanzjuanjose
2026-04-14 01:00:37 +02:00
parent 3da81a9495
commit 9dd97b34f2
16 changed files with 339 additions and 137 deletions

View File

@@ -1,25 +1,36 @@
services:
web:
build:
context: ..
dockerfile: deployments/Dockerfile
container_name: ${CONTAINER_NAME}
restart: always
working_dir: /app
db:
image: postgres:15
container_name: django_db_local
# Cargamos el archivo directamente
env_file:
- ../.env
environment:
- DEBUG=${DEBUG_MODE}
- PYTHONPATH=/app
- DB_NAME=gitea
- DB_USER=gitea
- DB_PASSWORD=gitea # <-- Asegúrate de que esta sea la que pusiste en la web de Gitea
- DB_HOST=gitea-db # <-- IMPORTANTE: Nombre del servicio, sin el "-1"
- DB_PORT=5432
networks:
- gitea_bridge # <-- Conectamos el servicio a nuestro puente
# POSTGRES_DB espera estas variables exactas,
# así que las mapeamos a lo que tienes en tu .env
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- "${PORT}:8000"
- "5432:5432"
volumes:
- local_postgres_data:/var/lib/postgresql/data
networks:
gitea_bridge: # <-- Definimos el puente
external: true
name: root_gitea_gitea # <-- ESTE es el nombre real que sale en tu 'docker network ls'
web:
build: .
container_name: django_app_dev
volumes:
- ..:/app
# Cargamos el archivo directamente aquí también
env_file:
- ../.env
environment:
- DB_HOST=db
- DB_PORT=5432
ports:
- "8000:8000"
depends_on:
- db
volumes:
local_postgres_data: