1. The problem I’m having:
Everything is functional but when I do maintenance I would like to start another docker container that displays a status message backup in progress/site maintenance during certain times during the day.
2. Error messages and/or full log output:
N/a
3. Caddy version:
Latest docker image (caddy:latest)
4. How I installed and ran Caddy:
Docker compose. Everything including lemmy runs on docker, all is docker everywhere. Nothing is not a docker image.
a. System environment:
Debian 12 with docker compose.
b. Command:
Docker compose file, no issue here.
d. My complete Caddy config:
(caddy-common) {
encode gzip
header {
-Server
Strict-Transport-Security "max-age=31536000; include-subdomains;"
X-XSS-Protection "1; mode=block"
X-Frame-Options "DENY"
X-Content-Type-Options nosniff
Referrer-Policy no-referrer-when-downgrade
X-Robots-Tag "none"
}
}
{$LEMMY_HOSTNAME} {
import caddy-common
reverse_proxy http://lemmy-ui:1234
@lemmy {
path /api/*
path /pictrs/*
path /feeds/*
path /nodeinfo/*
path /.well-known/*
}
@lemmy-hdr {
header Accept application/*
}
handle @lemmy {
reverse_proxy http://lemmy:8536
}
handle @lemmy-hdr {
reverse_proxy http://lemmy:8536
}
@lemmy-post {
method POST
}
handle @lemmy-post {
reverse_proxy http://lemmy:8536
}
}
5. Links to relevant resources:
What I would like to have the option to do is to bring down the lemmy UI website and backend running postgres and then bring up this docker container:
I am able to start this docker container on port 8080 and display a maintenance page, but the issue is I need caddy in front as this has the SSL certificate for port 443 and redirect from port 80.
I want caddy to be able to fall over to this site on port 8080 if lemmy is down for maintenance so that during the backup window instead of the site being dead, the docker with the maintenance page on port 8080 is displaed instead with the ssl certificate on port 443.
Is this possible to complete? I am stuck. I dont know if this is possible and unsure how to proceed.
Thank you to anyone who is able to help.
Kind regards
Peter