Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Compose: start Caddy with the server, not after it reports healthy

milind-soni3d7091156998
diff --git a/compose.yaml b/compose.yaml
index ee87c5ce62..4e69759ac1 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -58,9 +58,12 @@ services:
export OMB_UPSTREAM_SCHEME=https
fi
exec caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
+ # Started with the server, not after it is healthy: Caddy reaches it over the socket
+ # whenever it answers, so `up` never waits on the server's health, and HTTPS is back
+ # as soon as a restarted server is.
depends_on:
omb:
- condition: service_healthy
+ condition: service_started
volumes:
- ./deploy/local/Caddyfile:/etc/caddy/Caddyfile:ro
- edge:/run/openmausbot
diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml
index 6057131c15..510b495dec 100644
--- a/deploy/docker-compose.yml
+++ b/deploy/docker-compose.yml
@@ -59,9 +59,12 @@ services:
ports:
- "80:80"
- "443:443"
+ # Started with the server, not after it is healthy: Caddy reaches it over the socket
+ # whenever it answers, so `up` never waits on the server's health, and HTTPS is back
+ # as soon as a restarted server is.
depends_on:
omb:
- condition: service_healthy
+ condition: service_started
environment:
DOMAIN: ${DOMAIN}
volumes: