Support for multiple games and keys per game, refactor, tweaks

* Update editorconfig for Dockerfile formatting
* Update Dockerfile to strip debug symbols
* Support pushing multiple highscores and use of Options to support traditional API mode
* Support sending and retrieving different highscore lists for a game based on a key
* Support retrieving partial highscore lists for client side pagination
* Use of vweb_global attribute for better performance (No mutex/shared variable) and immutability
* Support for a verification key that is used for checksumming score data with a private key to raise the difficulty for potential cheaters
* Add Logger for nicer console output and severity distinction
* Use of transactions in database for higher reliability
* Additional error checking for improved error recovery and reliability
This commit is contained in:
Manuel 2023-10-02 13:46:51 +02:00
parent 674aa90c49
commit dc8c7bd2b6
Signed by: Manuel
GPG key ID: 4085037435E1F07A
9 changed files with 342 additions and 174 deletions

View file

@ -1,8 +1,8 @@
FROM git.snrd.eu/sunred/vlang:alpine AS build
FROM thevlang/vlang:alpine AS build
WORKDIR /tmp/app
COPY . .
RUN v -prod -o highscore-server .
RUN v -prod -ldflags "-s -w" -o highscore-server .
FROM alpine:latest
@ -10,6 +10,6 @@ RUN apk --no-cache add sqlite-libs
WORKDIR /app
COPY --from=build /tmp/app/highscore-server .
COPY --from=build /tmp/app/config.example.toml ./config.toml
COPY ./config.example.toml ./config.toml
ENTRYPOINT [ "./highscore-server" ]