services: web: build: context: .. dockerfile: deployments/Dockerfile container_name: ${CONTAINER_NAME} restart: always working_dir: /app environment: - DEBUG=${DEBUG_MODE} - PYTHONPATH=/app - DB_NAME=gitea - DB_USER=gitea - DB_PASSWORD=gitea # CAMBIO CLAVE: Usamos el nombre del servicio, no el del contenedor con el "-1" - DB_HOST=gitea-db - DB_PORT=5432 networks: - gitea_network ports: - "${PORT}:8000" networks: gitea_network: external: true # IMPORTANTE: Aquí debe ir el nombre que te salió al hacer 'docker network ls' # Si tu red se llama 'gitea_default', pon ese nombre aquí. name: gitea_default