Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 116 additions & 81 deletions build/container/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,84 +16,119 @@
#
# See https://compose-spec.io for the full specification.

services:
# ──────────────────────────────────────────────────────────────────────
# Primary application service
# ──────────────────────────────────────────────────────────────────────
"sholes":
build:
context: ..
dockerfile: build/container/Containerfile
image: "ghcr.io/hyperpolymath/sholes:latest"
ports:
- "8080:8080"
environment:
APP_HOST: "[::]"
APP_PORT: "8080"
APP_LOG_FORMAT: "json"
APP_DATA_DIR: "/data"
volumes:
- "sholes-data:/data"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s

# ──────────────────────────────────────────────────────────────────────
# rokur — secrets-management gate (stapeln). Fronts the app and refuses
# to start the stack unless required secrets are present. on Wolfi.
# Remove this service if you do not use secret gating.
# ──────────────────────────────────────────────────────────────────────
rokur:
image: ghcr.io/hyperpolymath/rokur:latest
environment:
ROKUR_BACKEND: "http://sholes:8080"
ROKUR_LISTEN: "[::]:8081"
ROKUR_REQUIRED_SECRETS: "" # comma-separated env names that MUST be set
ROKUR_AUDIT_LOG: "/var/log/rokur/audit.jsonl"
ROKUR_LOG_FORMAT: "json"
ports:
- "8081:8081"
volumes:
- rokur-audit:/var/log/rokur
depends_on:
"sholes":
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8081/health"]
interval: 30s
timeout: 5s
retries: 3

# ──────────────────────────────────────────────────────────────────────
# svalinn — edge gateway (stapeln). TLS termination, auth, rate limiting.
# Reads the gatekeeper policy from build/container/stapeln/.gatekeeper.yaml.
# Remove this service for a bare app with no gateway.
# ──────────────────────────────────────────────────────────────────────
svalinn:
image: ghcr.io/hyperpolymath/svalinn:latest
ports:
- "443:443"
- "80:80"
environment:
SVALINN_BACKEND: "http://rokur:8081"
SVALINN_POLICY_FILE: "/etc/svalinn/gatekeeper.yaml"
SVALINN_TLS_AUTO: "true"
volumes:
- ./stapeln/.gatekeeper.yaml:/etc/svalinn/gatekeeper.yaml:ro
depends_on:
- rokur
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:80/health"]
interval: 30s
timeout: 5s
retries: 3

volumes:
"sholes-data":
rokur-audit:
{
services: {
# ──────────────────────────────────────────────────────────────────────
# Primary application service
# ──────────────────────────────────────────────────────────────────────
sholes: {
build: {
context: "..",
dockerfile: "build/container/Containerfile",
},
image: "ghcr.io/hyperpolymath/sholes:latest",
ports: [
"8080:8080",
],
environment: {
APP_HOST: "[::]",
APP_PORT: "8080",
APP_LOG_FORMAT: "json",
APP_DATA_DIR: "/data",
},
volumes: [
"sholes-data:/data",
],
restart: "unless-stopped",
healthcheck: {
test: [
"CMD",
"curl",
"-sf",
"http://localhost:8080/health",
],
interval: "30s",
timeout: "5s",
retries: 3,
start_period: "10s",
},
},
# ──────────────────────────────────────────────────────────────────────
# rokur — secrets-management gate (stapeln). Fronts the app and refuses
# to start the stack unless required secrets are present. on Wolfi.
# Remove this service if you do not use secret gating.
# ──────────────────────────────────────────────────────────────────────
rokur: {
image: "ghcr.io/hyperpolymath/rokur:latest",
environment: {
ROKUR_BACKEND: "http://sholes:8080",
ROKUR_LISTEN: "[::]:8081",
ROKUR_REQUIRED_SECRETS: "", # comma-separated env names that MUST be set
ROKUR_AUDIT_LOG: "/var/log/rokur/audit.jsonl",
ROKUR_LOG_FORMAT: "json",
},
ports: [
"8081:8081",
],
volumes: [
"rokur-audit:/var/log/rokur",
],
depends_on: {
sholes: {
condition: "service_healthy",
},
},
restart: "unless-stopped",
healthcheck: {
test: [
"CMD",
"curl",
"-sf",
"http://localhost:8081/health",
],
interval: "30s",
timeout: "5s",
retries: 3,
},
},
# ──────────────────────────────────────────────────────────────────────
# svalinn — edge gateway (stapeln). TLS termination, auth, rate limiting.
# Reads the gatekeeper policy from build/container/stapeln/.gatekeeper.yaml.
# Remove this service for a bare app with no gateway.
# ──────────────────────────────────────────────────────────────────────
svalinn: {
image: "ghcr.io/hyperpolymath/svalinn:latest",
ports: [
"443:443",
"80:80",
],
environment: {
SVALINN_BACKEND: "http://rokur:8081",
SVALINN_POLICY_FILE: "/etc/svalinn/gatekeeper.yaml",
SVALINN_TLS_AUTO: "true",
},
volumes: [
"./stapeln/.gatekeeper.yaml:/etc/svalinn/gatekeeper.yaml:ro",
],
depends_on: [
"rokur",
],
restart: "unless-stopped",
healthcheck: {
test: [
"CMD",
"curl",
"-sf",
"http://localhost:80/health",
],
interval: "30s",
timeout: "5s",
retries: 3,
},
},
},
volumes: {
sholes-data: null,
rokur-audit: null,
},
}
Loading
Loading