From 397c27e0e4415679e68bd430ad7aa50f2a029f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=A0s?= <86352901+LucasVbr@users.noreply.github.com> Date: Sun, 3 May 2026 16:26:40 +0200 Subject: [PATCH] chore: update docker-compose configuration for web-legacy and web services --- Makefile | 11 +++++++++++ compose.yml | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c45ec2f..1c5a500 100644 --- a/Makefile +++ b/Makefile @@ -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 %: @: diff --git a/compose.yml b/compose.yml index c398ede..0af01c1 100644 --- a/compose.yml +++ b/compose.yml @@ -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: