From 2a588331907a6c091b5e0b2288975fc2f3256d19 Mon Sep 17 00:00:00 2001 From: Josep Date: Sat, 22 Aug 2026 23:15:23 +0200 Subject: [PATCH] fix track --- README.md | 4 ++-- docker-compose.yml | 35 +++++++++++++++++------------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 6103cd9..910c85e 100644 --- a/README.md +++ b/README.md @@ -1364,7 +1364,7 @@ php artisan site:maintenance --up ## Tests ```bash -php artisan test # 394 tests, 1128 aserciones +php artisan test # 391 tests, 1121 aserciones ``` En cada push y cada pull request, [`.github/workflows/tests.yml`](.github/workflows/tests.yml) @@ -1600,7 +1600,7 @@ docker compose -f docker-compose.test.yml run --rm test Levanta un Postgres en memoria, corre la suite entera contra él y lo tira. Es la comprobación que convierte «debería funcionar» en «funciona», y conviene hacerla -antes del primer despliegue. **394 tests en verde contra Postgres 17.** +antes del primer despliegue. **391 tests en verde contra Postgres 17.** Usa una etapa propia de la imagen: la de producción se construye con `--no-dev` y ahí no está ni el runner de tests. diff --git a/docker-compose.yml b/docker-compose.yml index 84a278f..ff43486 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,11 +19,17 @@ # break generating it in the first place — `docker compose run --rm --no-deps # app php artisan key:generate --show` has to work before `APP_KEY` exists. # -# `app` is not published on a host port: routing is Traefik, on the external -# `dokploy-network`, terminating TLS before anything reaches this container — -# same reason `docker/Caddyfile` trusts `X-Forwarded-*` only from private -# ranges. A manual deploy without Dokploy needs its own reverse proxy joined -# to that network, or `app` added back to `default` with a published port. +# `app` is not published on a host port: it only joins the external +# `dokploy-network` so Dokploy's Traefik can reach it, and TLS is terminated +# there before anything reaches this container — same reason +# `docker/Caddyfile` trusts `X-Forwarded-*` only from private ranges. The +# domain itself is configured through Dokploy's own "Domains" tab, which +# injects its own Traefik labels — don't also add them here, Traefik ends up +# with two routers for the same Host() and picks one unpredictably. +# +# A manual deploy without Dokploy needs its own reverse proxy joined to that +# network (with its own labels/config), or `app` added back to `default` with +# a published port. # # The web container is the only one that migrates, so a deploy runs them once # rather than once per replica. @@ -126,19 +132,12 @@ services: networks: - dokploy-network - default - labels: - - traefik.enable=true - - traefik.docker.network=dokploy-network - - traefik.http.routers.landing-api-web.rule=Host(`landing-api.pireon.dev`) - - traefik.http.routers.landing-api-web.entrypoints=web - - traefik.http.routers.landing-api-web.middlewares=redirect-to-https@file - - traefik.http.routers.landing-api-web.service=landing-api-web - - traefik.http.services.landing-api-web.loadbalancer.server.port=80 - - traefik.http.routers.landing-api-websecure.rule=Host(`landing-api.pireon.dev`) - - traefik.http.routers.landing-api-websecure.entrypoints=websecure - - traefik.http.routers.landing-api-websecure.service=landing-api-websecure - - traefik.http.routers.landing-api-websecure.tls.certresolver=letsencrypt - - traefik.http.services.landing-api-websecure.loadbalancer.server.port=80 + + # No Traefik labels here on purpose: the domain is configured through + # Dokploy's own "Domains" tab for this app, which injects its own labels + # at deploy time. Hand-writing another set on top of those, for the same + # Host(), gave Traefik two routers to choose between — it only broke once + # both existed together, which is exactly what happened. healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost/up"] interval: 30s