The deployment is a public hostname behind Traefik rather than a LAN-only box, which changes two things. TLS is now terminated by the proxy, so Basic credentials are no longer in cleartext. The container publishes no ports: doing so would leave an unencrypted copy of the app on the host, bypassing the proxy. The hostname lives in .env rather than compose.yaml, so no infrastructure detail is committed and the MIT publication option stays open. The password is now the only thing between the internet and the app, and a 500 ms sleep is not a defence at that exposure. Wrong guesses are rate limited per client address: five in a burst, then one per ten seconds, answered with 429. Two details that decide whether this works at all: - a request with no Authorization header is not charged. That is the handshake every browser session opens with, and counting it would lock the household out for simply opening the app a few times. - X-Forwarded-For is believed only when the connection arrived from a private address, i.e. through the proxy, and then only its last entry, which is the one the proxy observed. A direct client could otherwise forge a fresh address per attempt and walk past the limiter entirely. None of this substitutes for a strong password. It removes brute force as a practical route, nothing more. PRD §3, §9 and §10 are updated: "no external internet exposure" is no longer true.
25 lines
895 B
Bash
25 lines
895 B
Bash
# Copy to .env and fill in. .env is gitignored — the real registry hostname
|
|
# must not end up in the repository.
|
|
|
|
# Image coordinates. FOODSTER_REPO carries no tag.
|
|
FOODSTER_REPO=registry.example.com/you/foodster
|
|
FOODSTER_TAG=latest
|
|
|
|
# Shared household password. The app will not start without it.
|
|
FOODSTER_PASSWORD=changeme
|
|
|
|
# Hostname Traefik routes to. Kept here rather than in compose.yaml so no
|
|
# infrastructure detail is committed.
|
|
FOODSTER_HOST=foodster.example.com
|
|
|
|
# The database lives in ./data, bind-mounted into the container. These must
|
|
# match whoever owns that directory on the host, or the container cannot
|
|
# write to it. `id -u` and `id -g` will tell you.
|
|
FOODSTER_UID=1000
|
|
FOODSTER_GID=1000
|
|
|
|
# Used for every calendar-day calculation. Set it in development too: under
|
|
# UTC the date rolls over three hours late, which is exactly when dinner
|
|
# gets logged.
|
|
TZ=Europe/Helsinki
|