forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

hezarfen_frontend.env.example56 lines, 3.3 KiBHistoryRawDownload
1# hezarfen_frontend.env — production knobs for the podman compose stack.
2#
3# One-time setup ON THE SERVER, by hand:
4# mkdir -p ~/hezarfen_frontend
5# cp hezarfen_frontend.env.example ~/hezarfen_frontend/hezarfen_frontend.env
6# <fill in the values you are changing>
7# chmod 0600 ~/hezarfen_frontend/hezarfen_frontend.env
8#
9# Nothing automated creates, overwrites or uploads this file — the operator
10# owns it; compose only reads it (`podman compose --env-file`, plus `env_file`
11# into the frontend container). Plain KEY=value lines: no quotes, no `export`,
12# no trailing comment.
13#
14# The service declares this file as `env_file:`, so every key below overrides
15# the image's own ENV defaults (see the ENV block in Containerfile — that block
16# is the only place the default values are written) with no extra flag, and
17# nothing is shadowed by a compose default. Values are read when the container
18# STARTS: after editing, recreate (`podman compose up -d`, or
19# `systemctl --user restart hezarfen_frontend_compose`). `podman restart` keeps
20# the old environment.
21#
22# The app reads three keys today (server.ts): BACKEND_ORIGIN, PORT, HOST.
23
24# ── Backend origin ───────────────────────────────────────────────────────────
25# Where the container proxies /api/* — plain HTTP and the exam-room WebSocket
26# alike. The browser only ever talks to this frontend, so session cookies stay
27# same-origin.
28#
29# The frontend runs with host networking (`network_mode: host` in compose.yaml),
30# so it shares the host's loopback and this is simply where the backend
31# listens on this machine: the backend's compose publishes 127.0.0.1:7656.
32# A bridge network would resolve 127.0.0.1 to the container itself and refuse
33# the connection.
34BACKEND_ORIGIN=http://127.0.0.1:7656
35
36# ── Listen address ───────────────────────────────────────────────────────────
37# HOST=127.0.0.1 keeps the app on loopback: with host networking there is no
38# port mapping in front of it, so 0.0.0.0 would put it on every interface and
39# bypass the reverse proxy. The proxy (Ferron et al.) proxies to
40# http://127.0.0.1:<PORT> from this same machine.
41HOST=127.0.0.1
42
43# ── Listen port ──────────────────────────────────────────────────────────────
44# The port the app binds (and the port the reverse proxy must target). The
45# deploy's health gate reads this line back out of this file, so the two cannot
46# drift.
47PORT=5173
48
49# ── Image tag ────────────────────────────────────────────────────────────────
50# NOT read from here: HEZARFEN_TAG is compose interpolation only and travels in
51# the deploy-owned stack.env (the second `--env-file`, which wins for duplicate
52# keys). The systemd unit starts with `--no-build`, so the image must already
53# exist on the host before the first start:
54# podman compose build # build it here
55# podman load -i image.tar # or load one shipped from elsewhere
56#HEZARFEN_TAG=latest