packages/supabase/tests/e2e/avatar-flow.e2e.ts (pnpm e2e:avatar through scripts/avatar-e2e.sh: worker container on the Supabase network, 5 s sweep, no quarantine grace; a fresh account per run): clean upload and owner-only download (Bob, anon, quarantine key, direct final-key write refused), replacement purged after the grace (queue clock shifted through psql), late bytes through a still-valid signed upload URL swept, hostile and corrupted uploads rejected with closed codes, removal with the purge queue drained. Worker: the Storage API answers a missing object with HTTP 400 and statusCode 404; normalised to 404 so a purge of a never-written key is acked. docker-compose.yml: service worker under the worker profile (read-only, cap_drop ALL, no-new-privileges, 512m, 1 cpu, 64 pids, .env.worker, external Supabase network). docs/development/STORAGE.md: the implementation contract.
48 lines
1.5 KiB
YAML
48 lines
1.5 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
|
|
|
|
networks:
|
|
supabase:
|
|
external: true
|
|
# Local CLI stack: supabase_network_faunosteo; self-hosted compose: its own name.
|
|
name: ${SUPABASE_NETWORK:-supabase_network_faunosteo}
|