@@ -52,47 +52,44 @@ docker run --name exdiary-api \
5252
5353# Start the web frontend
5454docker run --name exdiary-frontend \
55+ -e API_URL=http://< YOUR_HOST_IP> :8851 \
5556 -p 8080:8080 \
56- ghcr.io/rwlove/exercisediary-frontend \
57- -a http://< YOUR_HOST_IP> :8851
57+ ghcr.io/rwlove/exercisediary-frontend
5858```
5959
6060Then open ** http://localhost:8080 ** in your browser.
6161
6262## Configuration
6363
64- Configuration is read from ` config.yaml ` or environment variables on the ** API** server.
64+ Both services are configured exclusively via environment variables. No config file is required.
65+
66+ ### API server (` exercisediary-api ` )
6567
6668| Variable | Description | Default |
6769| ---| ---| ---|
68- | ` AUTH ` | Enable session-cookie authentication | ` false ` |
69- | ` AUTH_EXPIRE ` | Session expiration: number + suffix ` m ` , ` h ` , ` d ` , or ` M ` | ` 7d ` |
70- | ` AUTH_USER ` | Username | ` "" ` |
71- | ` AUTH_PASSWORD ` | bcrypt-hashed password — [ how to generate] ( docs/BCRYPT.md ) | ` "" ` |
70+ | ` PORT ` | Listen port | ` 8851 ` |
7271| ` HOST ` | Listen address | ` 0.0.0.0 ` |
73- | ` PORT ` | API listen port | ` 8851 ` |
74- | ` THEME ` | Any [ Bootswatch] ( https://bootswatch.com ) theme name (lowercase) or extras: ` emerald ` , ` grass ` , ` grayscale ` , ` ocean ` , ` sand ` , ` wood ` | ` grass ` |
72+ | ` DATA_DIR ` | SQLite data directory (also settable via ` -d ` flag) | ` /data/ExerciseDiary ` |
73+ | ` API_KEY ` | Require this value on every ` X-Api-Key ` request header; empty = no auth | ` "" ` |
74+ | ` THEME ` | Any [ Bootswatch] ( https://bootswatch.com ) theme (lowercase) or extras: ` emerald ` , ` grass ` , ` grayscale ` , ` ocean ` , ` sand ` , ` wood ` | ` grass ` |
7575| ` COLOR ` | Background: ` light ` or ` dark ` | ` light ` |
7676| ` HEATCOLOR ` | Heatmap cell color | ` #03a70c ` |
7777| ` PAGESTEP ` | Rows per page | ` 10 ` |
78- | ` TZ ` | Timezone (required for correct date display) | ` "" ` |
79-
80- ## API server options
81-
82- | Flag | Description | Default |
83- | ---| ---| ---|
84- | ` -d ` | Path to data/config directory | ` /data/ExerciseDiary ` |
85- | ` -p ` | Port to listen on | ` 8851 ` |
86- | ` -k ` | API key required on ` X-Api-Key ` header (empty = no auth) | ` "" ` |
78+ | ` AUTH ` | Enable session-cookie authentication | ` false ` |
79+ | ` AUTH_USER ` | Username | ` "" ` |
80+ | ` AUTH_PASSWORD ` | bcrypt-hashed password — [ how to generate] ( docs/BCRYPT.md ) | ` "" ` |
81+ | ` AUTH_EXPIRE ` | Session expiration: number + suffix ` m ` , ` h ` , ` d ` , or ` M ` | ` 7d ` |
82+ | ` TZ ` | Timezone | ` "" ` |
8783
88- ## Frontend options
84+ ### Frontend server ( ` exercisediary-frontend ` )
8985
90- | Flag | Description | Default |
86+ | Variable | Description | Default |
9187| ---| ---| ---|
92- | ` -a ` | Base URL of the API server | ` http://localhost:8851 ` |
93- | ` -p ` | Port to listen on | ` 8080 ` |
94- | ` -k ` | API key sent to the API server | ` "" ` |
95- | ` -n ` | Path to local node_modules ([ node-bootstrap] ( https://github.com/aceberg/my-dockerfiles/tree/main/node-bootstrap ) ) | ` "" ` |
88+ | ` PORT ` | Listen port | ` 8080 ` |
89+ | ` API_URL ` | Base URL of the API server | ` http://localhost:8851 ` |
90+ | ` API_KEY ` | ` X-Api-Key ` value sent to the API (must match API server ` API_KEY ` ) | ` "" ` |
91+ | ` NODE_PATH ` | URL of a [ node-bootstrap] ( https://github.com/aceberg/my-dockerfiles/tree/main/node-bootstrap ) instance for offline use | ` "" ` |
92+ | ` TZ ` | Timezone | ` "" ` |
9693
9794## Local network only
9895
@@ -113,6 +110,16 @@ docker run --name exdiary-frontend \
113110
114111Or use [ docker-compose-local.yml] ( docker-compose-local.yml ) to build both images from source.
115112
113+ Set ` NODE_PATH ` on the frontend to point at the node-bootstrap instance:
114+
115+ ``` sh
116+ docker run --name exdiary-frontend \
117+ -e API_URL=http://< YOUR_HOST_IP> :8851 \
118+ -e NODE_PATH=http://< YOUR_HOST_IP> :8850 \
119+ -p 8080:8080 \
120+ ghcr.io/rwlove/exercisediary-frontend
121+ ```
122+
116123## Thanks
117124
118125- All Go packages listed in [ dependencies] ( https://github.com/aceberg/exercisediary/network/dependencies )
0 commit comments