Server-side savegames: Rust service with a shared savegame list in the menu, fallback to files
- server/: small axum service storing savegames as files (1 MB each, 500 MB total, rate limit) - docker compose: second container with a volume; nginx forwards /api/ - JS plugin: asynchronous HTTP requests polled by the game - Save/Load open a list page (name field, new, overwrite, load, delete with confirmation) - Without a reachable service the game keeps using savegame files and the browser autosave Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5b7896609
commit
7f4324abca
17 files changed
+1390
-30
No files matched your search
@@ -0,0 +1,13 @@
|
||||
FROM rust:1-slim AS build
|
||||
WORKDIR /src
|
||||
COPY Cargo.toml Cargo.lock* ./
|
||||
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
|
||||
COPY src src
|
||||
RUN touch src/main.rs && cargo build --release
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
COPY --from=build /src/target/release/dungeoncraft-saves /usr/local/bin/dungeoncraft-saves
|
||||
ENV SAVE_DIR=/data LISTEN=0.0.0.0:8080
|
||||
VOLUME /data
|
||||
EXPOSE 8080
|
||||
CMD ["dungeoncraft-saves"]
|
||||
Reference in new issue
Block a user