Files
faunosteo/docker-compose.yml
bchanot e633169a00 fix(workspace): LAN exposure via host firewall — the Supabase CLI forces 0.0.0.0, so PostgreSQL / Studio / raw Mailpit close by UFW rules on the LAN interface; gateway reduced to Mailpit behind basic auth on 54325
Owner run: the CLI prints 'All services bind to 0.0.0.0' and ignored the
rootless daemon's default address; the gateway could not share 54321/54324
with 0.0.0.0 listeners. Now: Kong serves the API directly; the DEV gateway
serves only Mailpit with basic auth on <DEV host>:54325; ENVIRONMENTS.md §3
gives the exact UFW rules (interface-scoped deny on 54322-54324, two cases
by current UFW state), rollback and impact; dev:net-check proves the
allowed surfaces from a distinct Docker network (5/5 OK) and prints the
refusal checks to run from another device, since a rootless container's
traffic to the host is delivered locally and cannot see the LAN firewall.
LRN-053 corrects LRN-052.
2026-10-13 23:01:19 +02:00

67 lines
2.2 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
# 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}