User accounts, login before the title screen, own savegames per user, standalone download
- Service: accounts with Argon2 password hashes and session tokens; the first login creates the admin (shared savegames of before move to the admin); the admin creates and deletes users; everybody can change the password; savegames are stored and listed per user - Game: login page before the title (only when the service is reachable), with licence and repository link; account page (password, logout; users for the admin); text fields with Tab/Enter, masked passwords, browser dialog on touch screens; long status messages wrap - Download Standalone: DungeonCraft.html with the game embedded (built in the Docker image, served to logged-in users via nginx auth_request); works from file:// without server and opens downloaded savegames - Without the service (standalone, local files) there is no login, savegame files as before Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8853d84564
commit
c9848c8948
15 files changed
+1232
-83
No files matched your search
@@ -16,9 +16,18 @@ RUN touch src/main.rs && cargo build --release --target wasm32-unknown-unknown \
|
||||
&& cp target/wasm32-unknown-unknown/release/dungeoncraft.wasm /out/ \
|
||||
&& cp "$CARGO_HOME"/registry/src/*/macroquad-*/js/mq_js_bundle.js /out/
|
||||
|
||||
# --- standalone: the whole game in one HTML file (downloadable for logged-in users)
|
||||
FROM python:3-alpine AS standalone
|
||||
WORKDIR /w
|
||||
COPY www/ www/
|
||||
COPY --from=build /out/ www/
|
||||
COPY tools/make_standalone.py .
|
||||
RUN mkdir -p /out/standalone && python3 make_standalone.py www /out/standalone/DungeonCraft.html
|
||||
|
||||
# --- serve: nginx
|
||||
FROM nginx:alpine
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY www/ /usr/share/nginx/html/
|
||||
COPY --from=build /out/ /usr/share/nginx/html/
|
||||
COPY --from=standalone /out/standalone/ /usr/share/nginx/html/standalone/
|
||||
EXPOSE 80
|
||||
Reference in new issue
Block a user