- docker-compose.yml: mark 'egress' network internal: true. Every Docker bridge network gets outbound NAT to the internet by default, not just 'default' - missing this meant sde-meeting-toolkit still had a direct route out despite being off 'default'. Confirmed via a real smoke test run (Check 2 failed before this fix). - egress-proxy/tinyproxy.conf: 'Group nogroup' doesn't exist on Alpine, only 'nobody'. Fixed to 'Group nobody' for both User and Group. - server.js: surface err.cause alongside err.message when the Anthropic call fails. undici wraps the real reason in a generic 'fetch failed' TypeError; without this the actual cause was invisible in both the API response and the logs.
83 lines
3.2 KiB
YAML
83 lines
3.2 KiB
YAML
# Standalone compose file for this tool.
|
|
#
|
|
# Network layout:
|
|
# - "proxy": external, owned by Nginx Proxy Manager's own stack. Lets NPM
|
|
# reach sde-meeting-toolkit by container name. No internet route.
|
|
# - "egress": private to this compose file. The ONLY thing
|
|
# sde-meeting-toolkit can reach besides "proxy". Used to talk to the
|
|
# egress-proxy container below.
|
|
# - "default": Compose's own auto-created network. Only egress-proxy is on
|
|
# it, since it's the only container here that needs real internet access.
|
|
#
|
|
# sde-meeting-toolkit itself is NOT on "default" and has no direct route to
|
|
# the internet at all. Its one outbound call (the AI draft button, to
|
|
# api.anthropic.com) is routed through egress-proxy via EGRESS_PROXY_URL,
|
|
# which only forwards that one destination and refuses everything else
|
|
# (see egress-proxy/tinyproxy.conf and egress-proxy/filter). A compromised
|
|
# app container still can't reach anything but Anthropic's API.
|
|
services:
|
|
sde-meeting-toolkit:
|
|
build: .
|
|
container_name: sde-meeting-toolkit
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5173:5173"
|
|
environment:
|
|
- MOCK_AI=${MOCK_AI:-false}
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
- EGRESS_PROXY_URL=${EGRESS_PROXY_URL:-http://egress-proxy:8888}
|
|
- APP_USERS=${APP_USERS:-}
|
|
- APP_USERNAME=${APP_USERNAME:-}
|
|
- APP_PASSWORD=${APP_PASSWORD:-}
|
|
- RATE_LIMIT_MAX=${RATE_LIMIT_MAX:-20}
|
|
- RATE_LIMIT_WINDOW_MS=${RATE_LIMIT_WINDOW_MS:-300000}
|
|
- LOGIN_ATTEMPT_MAX=${LOGIN_ATTEMPT_MAX:-10}
|
|
- LOGIN_ATTEMPT_WINDOW_MS=${LOGIN_ATTEMPT_WINDOW_MS:-600000}
|
|
- LOGIN_LOCKOUT_MS=${LOGIN_LOCKOUT_MS:-900000}
|
|
- AUTH_LOG_FILE=${AUTH_LOG_FILE:-./data/auth-log.jsonl}
|
|
- SIGNIN_LOG_DEBOUNCE_MS=${SIGNIN_LOG_DEBOUNCE_MS:-1800000}
|
|
- TOKEN_LIMIT_PER_USER=${TOKEN_LIMIT_PER_USER:-0}
|
|
- TOKEN_USAGE_FILE=${TOKEN_USAGE_FILE:-./data/token-usage.json}
|
|
volumes:
|
|
# Persists the per-user token quota file across restarts and rebuilds.
|
|
# Without this, everyone's daily usage silently resets on every deploy.
|
|
- ./data:/app/data
|
|
networks:
|
|
- proxy
|
|
- egress
|
|
depends_on:
|
|
- egress-proxy
|
|
# Hardening for a container that's reachable from the public internet
|
|
# (through Nginx Proxy Manager). Neither of these needs any Linux
|
|
# capability the app doesn't already have, and the app never needs to
|
|
# escalate privilege.
|
|
cap_drop:
|
|
- ALL
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
egress-proxy:
|
|
build: ./egress-proxy
|
|
container_name: sde-meeting-toolkit-egress-proxy
|
|
restart: unless-stopped
|
|
networks:
|
|
- egress
|
|
- default
|
|
cap_drop:
|
|
- ALL
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|
|
egress:
|
|
driver: bridge
|
|
# Without this, Docker still gives this network a NAT route to the
|
|
# public internet (every bridge network gets one by default, "default"
|
|
# isn't special) - which defeats the whole point. internal: true means
|
|
# nothing on this network, including sde-meeting-toolkit, has any route
|
|
# out except through egress-proxy, which also sits on "default" and IS
|
|
# meant to have one.
|
|
internal: true
|