Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(gateway): stop discarding container logs and add readiness (#2217)

Hampus3eeba1da2bdc
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