实现账号绑定、持久登录与跨设备对局恢复
CI / test (ubuntu-latest, node 22) (push) Failing after 33m10s
CI / test (ubuntu-latest, node 24) (push) Failing after 34m41s
CI / tooling (lint, imports, typecheck) (push) Failing after 36m11s
CI / test (windows-latest, node 22) (push) Canceled after 0s
CI / test (windows-latest, node 24) (push) Canceled after 0s
CI / test (ubuntu-latest, node 22) (push) Failing after 33m10s
CI / test (ubuntu-latest, node 24) (push) Failing after 34m41s
CI / tooling (lint, imports, typecheck) (push) Failing after 36m11s
CI / test (windows-latest, node 22) (push) Canceled after 0s
CI / test (windows-latest, node 24) (push) Canceled after 0s
This commit is contained in:
1 parent
488db49f11
commit
7c25c89992
62 files changed
+6855
-1005
No files matched your search
+14
-1
@@ -12,8 +12,18 @@
|
||||
# (public/fonts, data/assets.json and data/local-assets.json are copied from the build context when present)
|
||||
# Without any art the game still runs with placeholder visuals.
|
||||
#
|
||||
# Data: the opt-in Skland account binding (SP_SKLAND=1, docs/skland.md) is the only runtime state: one SQLite file of
|
||||
# account credentials (SP_SKLAND_DB). It must survive a container restart, so it belongs on a volume — this image
|
||||
# creates /app/skland-data and hands it to `node` below, and docker-compose.yml mounts the named volume `skland-data`
|
||||
# there with SP_SKLAND_DB=/app/skland-data/skland.db. There is deliberately no `VOLUME` instruction: an anonymous
|
||||
# volume would make `docker run` silently accumulate credentials a host cannot find, so the mount is the caller's
|
||||
# explicit choice (`-v skland-data:/app/skland-data`). The default (data/skland.db, inside the container) is only for
|
||||
# a throwaway run. The database is a secret: it holds account credentials, it sits outside every static mount, and it
|
||||
# must never be committed, served over HTTP or copied around unencrypted.
|
||||
#
|
||||
# Run: docker run -d --name stronghold -p 3000:3000 --restart unless-stopped stronghold-protocol
|
||||
# Env: PORT (3000), HOST (0.0.0.0), SP_COMBAT (client|server), SP_VERIFY (off|sample|all), TRUST_PROXY (auto|1|0), DEBUG
|
||||
# Env: PORT (3000), HOST (0.0.0.0), SP_COMBAT (client|server), SP_VERIFY (off|sample|all), TRUST_PROXY (auto|1|0), DEBUG,
|
||||
# SP_SKLAND (off; 1 turns the Skland account binding on), SP_SKLAND_DB (data/skland.db)
|
||||
|
||||
ARG NODE_IMAGE=node:22-alpine
|
||||
|
||||
@@ -53,6 +63,9 @@ COPY --from=build /app/data ./data
|
||||
COPY --from=build /app/public ./public
|
||||
# research tables: read by server/sim/nodeData.js as a fallback
|
||||
COPY --from=build /app/docs/research ./docs/research
|
||||
# the Skland credential database's directory (SP_SKLAND_DB): created before USER node and owned by it, so a fresh named
|
||||
# volume inherits a writable mount point and the unprivileged user can create the .db and its -wal / -shm side files
|
||||
RUN mkdir -p /app/skland-data && chown node:node /app/skland-data
|
||||
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in new issue
Block a user