fix: resolve bad gateway on dokploy by setting HOSTNAME=0.0.0.0 and traefik labels

This commit is contained in:
Erik
2026-01-22 14:11:41 -03:00
parent 8fc974efb8
commit 620c0b7c4a
2 changed files with 10 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ services:
networks:
- occto_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d occto_db"]
test: [ "CMD-SHELL", "pg_isready -U admin -d occto_db" ]
interval: 10s
timeout: 5s
retries: 5
@@ -48,6 +48,14 @@ services:
- MINIO_BUCKET_NAME=${MINIO_BUCKET_NAME:-occto-images}
- JWT_SECRET=${JWT_SECRET:-b33500bb3dc5504535c34cc5f79f4ca0f60994b093bded14d48f76c0c090f032234693219e60398cab053a9c55c1d426ef7b1768104db9040254ba7db452f708}
- LIBRETRANSLATE_URL=${LIBRETRANSLATE_URL:-https://libretranslate.stackbyte.cloud}
labels:
- "traefik.enable=true"
- "traefik.http.routers.occto-frontend.rule=Host(`${DOMAIN:-localhost}`)"
- "traefik.http.routers.occto-frontend.entrypoints=websecure"
- "traefik.http.routers.occto-frontend.tls=true"
- "traefik.http.routers.occto-frontend.tls.certresolver=letsencrypt"
- "traefik.http.services.occto-frontend.loadbalancer.server.port=3000"
- "traefik.docker.network=dokploy-network"
depends_on:
postgres:
condition: service_healthy

View File

@@ -61,6 +61,7 @@ EXPOSE 3000
# Definir variável de ambiente
ENV PORT=3000
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
# Comando de inicialização
CMD ["/app/start.sh"]