35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
name: archipelago
|
|
services:
|
|
web:
|
|
image: ${CADDY_IMAGE:?Set a pinned Caddy image digest or local image ID}
|
|
restart: unless-stopped
|
|
command: [caddy, run, --config, /etc/caddy/Caddyfile, --adapter, caddyfile]
|
|
read_only: true
|
|
security_opt: [no-new-privileges:true]
|
|
cap_drop: [ALL]
|
|
# The existing Caddy binary carries this file capability even on port 8080.
|
|
cap_add: [NET_BIND_SERVICE]
|
|
tmpfs: [/tmp, /config, /data]
|
|
ports:
|
|
- "${LISTEN_ADDRESS:-127.0.0.1}:${LISTEN_PORT:-8098}:8080"
|
|
volumes:
|
|
- ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- ./portal:/srv/portal:ro
|
|
# Monthly repository snapshots are mounted into subdirectories of the public
|
|
# root after this container starts. A private bind keeps the start-time view,
|
|
# so a freshly captured snapshot serves an empty directory (404) until the
|
|
# container is restarted; slave propagation makes host mounts visible.
|
|
- type: bind
|
|
source: ${PUBLIC_ROOT:?Set public artifact root}
|
|
target: /srv/artifacts
|
|
read_only: true
|
|
bind:
|
|
propagation: rslave
|
|
networks: [web]
|
|
healthcheck:
|
|
test: [CMD, wget, -q, -O, /dev/null, http://127.0.0.1:8080/archipelago/healthz]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
networks:
|
|
web: {}
|