Files
Halcyon/docker-compose.yml
T
2026-09-19 20:21:47 +02:00

46 lines
1.4 KiB
YAML

services:
web:
build: .
image: halcyon:latest
# A fixed name lets scripts/daily.sh find the container with `docker exec`.
container_name: halcyon
restart: unless-stopped
ports:
# Local only: the public entrance is Caddy, which terminates TLS.
- "127.0.0.1:8070:8080"
environment:
DATABASE_URL: sqlite:/data/wh.db
# The world. `docker exec ... daily` inherits these, so the daily job always
# matches the server. A world refuses changed settings once it has run, so
# only change them on a fresh volume. Defaults shown; override in .env.
WH_SEED: ${WH_SEED:-1}
WH_TICKS_PER_DAY: ${WH_TICKS_PER_DAY:-1440}
WH_CYCLES_PER_TICK: ${WH_CYCLES_PER_TICK:-2000}
WH_PROGRAM_BYTES: ${WH_PROGRAM_BYTES:-4096}
WH_RAM_BYTES: ${WH_RAM_BYTES:-8192}
WH_COMM_BYTES: ${WH_COMM_BYTES:-1024}
WH_ASTEROIDS: ${WH_ASTEROIDS:-500}
volumes:
- halcyon-data:/data
command: ["server"]
caddy:
image: caddy:2-alpine
container_name: halcyon-caddy
restart: unless-stopped
depends_on:
- web
ports:
- "80:80"
- "443:443"
- "443:443/udp" # HTTP/3
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data # certificates: keep this, or you will hit rate limits
- caddy-config:/config
volumes:
halcyon-data:
caddy-data:
caddy-config: