From 3eeba1da2bdca2bb4a16ca96b537f22e4bf1acb7 Mon Sep 17 00:00:00 2001 From: Hampus Date: Mon, 31 Aug 2026 00:13:20 +0200 Subject: [PATCH] fix(gateway): stop discarding container logs and add readiness (#2217) --- deploy/self-hosting/docker-compose.yml | 13 ++++++++++++- fluxer_gateway/config/sys.config.template | 5 +---- fluxer_gateway/scripts/docker_entrypoint.sh | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/deploy/self-hosting/docker-compose.yml b/deploy/self-hosting/docker-compose.yml index 04f28f595..3b2f8805e 100644 --- a/deploy/self-hosting/docker-compose.yml +++ b/deploy/self-hosting/docker-compose.yml @@ -114,7 +114,12 @@ services: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config - depends_on: [api, gateway, media-proxy, static-proxy, admin] + depends_on: + api: {condition: service_started} + gateway: {condition: service_healthy} + media-proxy: {condition: service_started} + static-proxy: {condition: service_started} + admin: {condition: service_started} postgres: image: postgres:16-alpine @@ -299,6 +304,12 @@ services: FLUXER_GATEWAY_MEDIA_PROXY_ENDPOINT: ${FLUXER_PUBLIC_SCHEME:-https}://${FLUXER_DOMAIN}/media FLUXER_GATEWAY_STATIC_CDN_ENDPOINT: ${FLUXER_PUBLIC_SCHEME:-https}://${FLUXER_DOMAIN} FLUXER_GATEWAY_LOGGER_LEVEL: info + healthcheck: + test: ["CMD", "curl", "-fsS", "-o", "/dev/null", "http://127.0.0.1:8080/_health/ready"] + interval: 10s + timeout: 5s + retries: 30 + start_period: 90s depends_on: nats: {condition: service_started} valkey: {condition: service_healthy} diff --git a/fluxer_gateway/config/sys.config.template b/fluxer_gateway/config/sys.config.template index f9085f5a3..b5a520338 100644 --- a/fluxer_gateway/config/sys.config.template +++ b/fluxer_gateway/config/sys.config.template @@ -1,10 +1,7 @@ % SPDX-License-Identifier: AGPL-3.0-or-later [ {kernel, [ - {logger_level, warning}, - {logger, [ - {handler, default, undefined} - ]} + {logger_level, warning} ]}, {sasl, [ {errlog_type, error} diff --git a/fluxer_gateway/scripts/docker_entrypoint.sh b/fluxer_gateway/scripts/docker_entrypoint.sh index 7e6c8e460..9675abf4f 100755 --- a/fluxer_gateway/scripts/docker_entrypoint.sh +++ b/fluxer_gateway/scripts/docker_entrypoint.sh @@ -56,4 +56,4 @@ export FLUXER_ERLANG_SCHEDULERS export FLUXER_ERLANG_DIRTY_CPU_SCHEDULERS export RELX_REPLACE_OS_VARS="${RELX_REPLACE_OS_VARS:-true}" -exec /opt/fluxer_gateway/bin/fluxer_gateway foreground >/dev/null 2>&1 +exec /opt/fluxer_gateway/bin/fluxer_gateway foreground