fix: connect frontend to forge proxy network with Traefik labels
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Camille 2026-05-31 00:19:21 +02:00
parent 7b2bdefee3
commit c6b71a61f0

View file

@ -5,8 +5,8 @@
# main / develop → SPRING_PROFILES_ACTIVE=prod COMPOSE_PROFILES=with-db # main / develop → SPRING_PROFILES_ACTIVE=prod COMPOSE_PROFILES=with-db
# PR preview → SPRING_PROFILES_ACTIVE=dev COMPOSE_PROFILES= (H2, no DB) # PR preview → SPRING_PROFILES_ACTIVE=dev COMPOSE_PROFILES= (H2, no DB)
# #
# Coolify reads SERVICE_FQDN_FRONTEND_80 and auto-injects Traefik labels. # Coolify proxy=NONE → we manually expose through the forge's Traefik
# Set the FQDN for each app in the Coolify UI — no manual labels needed. # (network: proxy, certresolver: letsencrypt).
# ────────────────────────────────────────────────────── # ──────────────────────────────────────────────────────
services: services:
@ -20,9 +20,18 @@ services:
depends_on: depends_on:
backend: backend:
condition: service_healthy condition: service_healthy
networks:
- default
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.citygame.rule=Host(`citygame.pele.cam`)"
- "traefik.http.routers.citygame.entrypoints=https"
- "traefik.http.routers.citygame.tls=true"
- "traefik.http.routers.citygame.tls.certresolver=letsencrypt"
- "traefik.http.services.citygame.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
environment: environment:
# Coolify replaces this value with the configured FQDN and injects
# the corresponding Traefik routing labels automatically.
- SERVICE_FQDN_FRONTEND_80 - SERVICE_FQDN_FRONTEND_80
healthcheck: healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/healthz || exit 1"] test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:80/healthz || exit 1"]
@ -81,3 +90,7 @@ services:
volumes: volumes:
pgdata: pgdata:
driver: local driver: local
networks:
proxy:
external: true