chore: update docker-compose configuration for web-legacy and web services

This commit is contained in:
Lucàs
2026-05-03 16:26:40 +02:00
parent 1cbc864cb2
commit 397c27e0e4
2 changed files with 26 additions and 1 deletions
+11
View File
@@ -27,9 +27,20 @@ build:
logs:
$(DC) logs -f $(service)
## shell: Open a shell in the application container
.PHONY: shell
shell:
$(DC) exec $(service) sh
## prune: Stop the application and remove volumes
.PHONY: prune
prune:
$(DC) down -v
## restart: Restart the application
.PHONY: restart
restart: down up
# https://stackoverflow.com/a/6273809/1826109
%:
@:
+15 -1
View File
@@ -4,13 +4,27 @@ services:
web-legacy:
image: caddy:alpine
volumes:
- ./apps/web:/usr/share/caddy:ro
- ./apps/web-legacy:/usr/share/caddy:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT}_web_legacy.rule=Host(`web-legacy.${PROJECT}.localhost`)"
- "traefik.http.services.${PROJECT}_web_legacy.loadbalancer.server.port=80"
networks:
- traefik
web:
build:
context: ./apps/web
target: ${ENV_MODE:-production}
volumes:
- ./apps/web:/app:cached
- /app/node_modules
labels:
- "traefik.enable=true"
- "traefik.http.routers.${PROJECT}_web.rule=Host(`web.${PROJECT}.localhost`)"
- "traefik.http.services.${PROJECT}_web.loadbalancer.server.port=3000"
networks:
- traefik
networks:
traefik: