90 lines
3.0 KiB
YAML
90 lines
3.0 KiB
YAML
# Every Faunosteo-owned Docker resource is named `faunosteo_*` (DEPLOY.md
|
|
# "Docker resource naming"): project name = network / default volume prefix.
|
|
name: faunosteo
|
|
|
|
services:
|
|
app:
|
|
container_name: faunosteo_app
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "${PORT:-8080}:${PORT:-8080}"
|
|
env_file:
|
|
- .env
|
|
restart: unless-stopped
|
|
# Files worker (plan Step 8 / Rust R1, docs/development/STORAGE.md §3): the keyed
|
|
# job loop and the keyless decode child, one static binary on distroless. Started
|
|
# only with the `worker` profile: `docker compose --profile worker up -d worker`.
|
|
# It joins the Supabase compose network (never a published port) and reads its
|
|
# own env file, separate from the app's: SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY,
|
|
# WORKER_ID (chmod 600, excluded from any backup copy of env files).
|
|
worker:
|
|
container_name: faunosteo_worker
|
|
profiles: ["worker"]
|
|
build:
|
|
context: .
|
|
dockerfile: crates/worker/Dockerfile
|
|
image: faunosteo_worker:local
|
|
env_file:
|
|
- .env.worker
|
|
command: ["run"]
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
mem_limit: 512m
|
|
cpus: 1
|
|
pids_limit: 64
|
|
networks:
|
|
- supabase
|
|
restart: unless-stopped
|
|
|
|
# Sheet verification worker (V1-2.3, V1-2 contract §6.4): the same image and hardening as
|
|
# `worker`, the verification loop only (no avatar, no sweep). Its `verify` child is capped
|
|
# at 1 GiB of address space (crates/worker/src/limits.rs): the container keeps room for it
|
|
# and the parent, so the child's own limit binds first. Started only with the `worker`
|
|
# profile: `docker compose --profile worker up -d worker-verify`; never on DEV.
|
|
worker-verify:
|
|
container_name: faunosteo_worker_verify
|
|
profiles: ["worker"]
|
|
image: faunosteo_worker:local
|
|
env_file:
|
|
- .env.worker
|
|
command: ["run", "--jobs", "sheet-verify"]
|
|
read_only: true
|
|
cap_drop: [ALL]
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
mem_limit: 1280m
|
|
cpus: 1
|
|
pids_limit: 64
|
|
networks:
|
|
- supabase
|
|
restart: unless-stopped
|
|
|
|
# DEV gateway (docs/development/ENVIRONMENTS.md §3): Mailpit behind basic auth on
|
|
# <DEV host>:54325, the only LAN entry to the DEV mails (the CLI's raw Mailpit port
|
|
# 54324 is closed to the LAN by the host firewall rule). Started by `pnpm dev:gateway`
|
|
# (profile `dev`), which exports FAUNOSTEO_DEV_HOST and generates the htpasswd.
|
|
dev-gateway:
|
|
container_name: faunosteo_dev_gateway
|
|
profiles: ["dev"]
|
|
image: nginx:1.31-alpine
|
|
volumes:
|
|
- ./docker/dev-gateway/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./docker/dev-gateway/htpasswd:/etc/nginx/htpasswd:ro
|
|
ports:
|
|
- "${FAUNOSTEO_DEV_HOST:-127.0.0.1}:54325:54325"
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
networks:
|
|
- supabase
|
|
restart: unless-stopped
|
|
|
|
networks:
|
|
supabase:
|
|
external: true
|
|
# Local CLI stack: supabase_network_faunosteo; self-hosted compose: its own name.
|
|
name: ${SUPABASE_NETWORK:-supabase_network_faunosteo}
|