Files
homefeed/.env.example
SalastilandClaude Sonnet 5.5 e8e18ee2ec
Build and push Docker images / backend (push) Canceled after 0s
Build and push Docker images / frontend (push) Canceled after 0s
Make the SSR hairpin address configurable (LAN_HOST_IP) and follow the NAS to 192.168.0.60
The backend container maps the public domain to the reverse proxy's LAN IP so
server-side renders stay on the LAN. That address was hardcoded to the old NAS
IP, so after the move every SSR fetch failed and each page returned a 500.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-13 18:17:21 -04:00

59 lines
3.0 KiB
Bash

# Copy to .env (same directory as docker-compose.yml) — Compose reads it
# automatically for the ${VAR} substitutions below. See README.md "Docker".
# The one public-facing URL used for everything: the backend's CORS check
# (FRONTEND_ORIGIN), adapter-node's own origin validation (ORIGIN), and — since
# the frontend container shares the backend container's network namespace (see
# docker-compose.yml) — also what both the browser and the frontend's own
# server-rendered requests use to reach the backend (VITE_BACKEND_URL).
#
# For local testing on your own machine, the defaults below (matching the
# published ports) already work as-is. For a real deployment, put both
# containers behind a reverse proxy on one public domain and set PUBLIC_ORIGIN
# (and VITE_BACKEND_URL, if routing by path — see README.md) to that domain,
# same as the non-Docker deployment instructions.
PUBLIC_ORIGIN=http://localhost:3000
# Baked into the frontend image at BUILD time, not read at container start —
# changing this needs `docker compose build frontend`, not just a restart.
VITE_BACKEND_URL=http://localhost:4000
# Host ports to publish (both are published on the backend container — see
# docker-compose.yml's network_mode note).
FRONTEND_PORT=3000
BACKEND_PORT=4000
# Turns on the admin cog icon + /admin/* pages — off by default, matching the
# non-Docker deployment. The admin API key (see ADMIN_API_KEY below) is what
# actually protects /api/admin/* either way.
ADMIN_PANEL_ENABLED=false
# The admin password: the key the admin login page asks for, and the only thing
# protecting /api/admin/*. Set it to a long string of your choosing (16+ characters;
# the backend warns at startup if shorter) and it stays the same across restarts and
# container recreates. Leave it blank and the backend invents a random key instead —
# printed to `docker compose logs backend`, and in a container with no writable .env
# a NEW one every time the container is recreated.
# Avoid `$` in the value (compose treats it as the start of a variable). A chosen
# key is deliberately NOT printed to the log.
# ADMIN_API_KEY=
# Optional — unlocks "private" categories for visitors who log in with this
# password on the public site's lock icon. Leave unset/blank to disable private
# categories entirely.
# PRIVATE_ACCESS_PASSWORD=
# Where `docker compose build`/`push`/`pull` read/write the two images —
# defaults to this project's Gitea container registry (same host as the git
# server). CI (.gitea/workflows/docker-build.yml) sets IMAGE_TAG to the branch
# name and pushes `latest` on master; override either for a different registry
# or a specific tag to deploy.
# REGISTRY=git.salastil.com/salastil
# IMAGE_TAG=latest
# LAN address of the machine running your reverse proxy (docker-compose.prod.yml only).
# The backend container maps your public domain to it so the frontend's server-side
# fetches stay on the LAN instead of going out to Cloudflare and back. If this is wrong
# or stale (e.g. the server got a new IP), every page returns a 500 "fetch failed".
# LAN_HOST_IP=192.168.0.60