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,5 @@
services:
base-app:
image: nginx:latest # Imagen base
ports:
- "80" # Puerto expuesto

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