head-vps/hypercomics/compose.yaml

48 lines
1.6 KiB
YAML

# Hypercomics (HEAD): the three static sites nginx served until 2026-11-03, same folders, same
# rules (files and directory indexes, else 404; nginx's app. fallback to /index.php had no PHP
# behind it). Not moved: www. (no DNS record) and data. (Strapi on :1337, already down; its code
# and SQLite database are in /root/hyperbackend and in the 2026-11-03 backup).
services:
static:
image: caddy:2.11.7-alpine@sha256:e70b164da81ef698b3ad19af799ea6086ce6d9e48ed4079eb9fe26f6fbf14ee5
restart: unless-stopped
command: ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
volumes:
- ${WWW_ROOT}:/www:ro
networks:
- caddy
# The public Caddy terminates HTTPS and forwards each name here with its Host header.
labels:
caddy_0: ${HYPERCOMICS_DOMAIN}
caddy_0.reverse_proxy: "{{upstreams 8080}}"
caddy_1: app.${HYPERCOMICS_DOMAIN}
caddy_1.reverse_proxy: "{{upstreams 8080}}"
caddy_2: text.${HYPERCOMICS_DOMAIN}
caddy_2.reverse_proxy: "{{upstreams 8080}}"
configs:
caddyfile:
content: |
{
admin off
auto_https off
}
http://${HYPERCOMICS_DOMAIN}:8080 {
root * /www/hypercomicssite/public
file_server
}
http://app.${HYPERCOMICS_DOMAIN}:8080 {
root * /www/hypercomics-maker/public
file_server
}
http://text.${HYPERCOMICS_DOMAIN}:8080 {
root * /www/hypercomics-text/textmaker
file_server
}
networks:
caddy:
external: true