- Go module (github.com/elfoundation/hatch) with go 1.25 - cmd/hatch: HTTP server with GET /healthz returning 200 OK - Multi-stage Dockerfile producing static binary from scratch - docker-compose with hatch + optional Caddy reverse proxy - CI placeholder with Go test/lint stubs - .gitignore, .dockerignore, .env.example Co-Authored-By: Paperclip <noreply@paperclip.ing>
34 lines
712 B
YAML
34 lines
712 B
YAML
services:
|
|
hatch:
|
|
build: .
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:8080:8080"
|
|
volumes:
|
|
- hatch-data:/data
|
|
environment:
|
|
- HATCH_PORT=8080
|
|
- HATCH_DB_PATH=/data/hatch.db
|
|
- HATCH_BASE_URL=${HATCH_BASE_URL:-http://localhost}
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy-data:/data
|
|
- caddy-config:/config
|
|
environment:
|
|
- HATCH_HOSTNAME=${HATCH_HOSTNAME:-localhost}
|
|
# Caddy runs even without a real hostname (self-signed)
|
|
profiles:
|
|
- with-caddy
|
|
|
|
volumes:
|
|
hatch-data:
|
|
caddy-data:
|
|
caddy-config:
|