feat(docker-compose): introduce common services and update web service configuration

This commit is contained in:
Mauricio Siu
2025-04-12 17:37:53 -06:00
parent ea0d139c4f
commit cb3a114ed3
4 changed files with 25 additions and 12 deletions

View File

@@ -0,0 +1,13 @@
services:
web-service:
extends:
file: common-services.yml # Apunta al archivo común
service: base-app # Usa el servicio base
environment:
- ENVIRONMENT=production # Sobrescribe o agrega configuración
worker-service:
extends:
file: common-services.yml
service: base-app
command: ["/bin/sh", "-c", "while true; do echo 'Worker running'; sleep 10; done"] # Cambia el comando

View File

@@ -0,0 +1,6 @@
services:
webapp:
environment:
- DEBUG=1 # Agrega una variable de entorno
ports:
- "80" # Agrega un nuevo puerto (se concatenará con el original)

View File

@@ -1,13 +1,7 @@
services:
web-service:
extends:
file: common-services.yml # Apunta al archivo común
service: base-app # Usa el servicio base
environment:
- ENVIRONMENT=production # Sobrescribe o agrega configuración
worker-service:
extends:
file: common-services.yml
service: base-app
command: ["/bin/sh", "-c", "while true; do echo 'Worker running'; sleep 10; done"] # Cambia el comando
webapp:
image: nginx:latest # Imagen base
ports:
- "80" # Puerto expuesto
volumes:
- ./app:/usr/share/nginx/html # Volumen para archivos