chore(project): set the default port to 42776
Make 42776 the project's default listen port everywhere :8080 was the default: .env.example, the Go config fallback, the Dockerfile (ENV/EXPOSE/healthcheck), and the docs example. 42776 is the sum of the Unicode code points of 七夕 (七 U+4E03 = 19971, 夕 U+5915 = 22805). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -6,7 +6,9 @@
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Server
|
# Server
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
LISTEN_ADDR=:8080
|
# 42776 is the project's default port: the sum of the Unicode code points of
|
||||||
|
# 七夕 (七 U+4E03 = 19971, 夕 U+5915 = 22805).
|
||||||
|
LISTEN_ADDR=:42776
|
||||||
JWT_SECRET=change-me-to-a-random-32-byte-secret
|
JWT_SECRET=change-me-to-a-random-32-byte-secret
|
||||||
JWT_ACCESS_TTL=15m
|
JWT_ACCESS_TTL=15m
|
||||||
JWT_REFRESH_TTL=720h
|
JWT_REFRESH_TTL=720h
|
||||||
|
|||||||
+3
-3
@@ -73,17 +73,17 @@ RUN mkdir -p /data/files /data/thumbs /data/import && chown -R app:app /data
|
|||||||
|
|
||||||
# Non-secret defaults mirroring .env.example. Secrets (JWT_SECRET, ADMIN_PASSWORD,
|
# Non-secret defaults mirroring .env.example. Secrets (JWT_SECRET, ADMIN_PASSWORD,
|
||||||
# DATABASE_URL) are intentionally NOT baked in — pass them at `docker run`.
|
# DATABASE_URL) are intentionally NOT baked in — pass them at `docker run`.
|
||||||
ENV LISTEN_ADDR=:8080 \
|
ENV LISTEN_ADDR=:42776 \
|
||||||
STATIC_DIR=/app/static \
|
STATIC_DIR=/app/static \
|
||||||
FILES_PATH=/data/files \
|
FILES_PATH=/data/files \
|
||||||
THUMBS_CACHE_PATH=/data/thumbs \
|
THUMBS_CACHE_PATH=/data/thumbs \
|
||||||
IMPORT_PATH=/data/import
|
IMPORT_PATH=/data/import
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 42776
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
USER app
|
USER app
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
||||||
CMD wget -qO- http://127.0.0.1:8080/health >/dev/null 2>&1 || exit 1
|
CMD wget -qO- http://127.0.0.1:42776/health >/dev/null 2>&1 || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/app/server"]
|
ENTRYPOINT ["/app/server"]
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ func Load() (*Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cfg := &Config{
|
cfg := &Config{
|
||||||
ListenAddr: defaultStr("LISTEN_ADDR", ":8080"),
|
ListenAddr: defaultStr("LISTEN_ADDR", ":42776"),
|
||||||
JWTSecret: requireStr("JWT_SECRET"),
|
JWTSecret: requireStr("JWT_SECRET"),
|
||||||
JWTAccessTTL: parseDuration("JWT_ACCESS_TTL", "15m"),
|
JWTAccessTTL: parseDuration("JWT_ACCESS_TTL", "15m"),
|
||||||
JWTRefreshTTL: parseDuration("JWT_REFRESH_TTL", "720h"),
|
JWTRefreshTTL: parseDuration("JWT_REFRESH_TTL", "720h"),
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ stored as hash in `activity.sessions.token_hash`.
|
|||||||
|
|
||||||
```env
|
```env
|
||||||
# Server
|
# Server
|
||||||
LISTEN_ADDR=:8080
|
LISTEN_ADDR=:42776
|
||||||
JWT_SECRET=<random-32-bytes>
|
JWT_SECRET=<random-32-bytes>
|
||||||
JWT_ACCESS_TTL=15m
|
JWT_ACCESS_TTL=15m
|
||||||
JWT_REFRESH_TTL=720h
|
JWT_REFRESH_TTL=720h
|
||||||
|
|||||||
Reference in New Issue
Block a user