Several improvements
* Make Dockerfile build and run correctly on alpine, fix missing sqlite * Make config shared to avoid reading from file on each request * Correctly handle Signals to gracefully stop database connection and to speed up shutdown, relevant for docker deployment * Correctly check for sqlite error on table creation
This commit is contained in:
parent
c03f949344
commit
7749b7c159
5 changed files with 59 additions and 19 deletions
|
@ -2,10 +2,12 @@ FROM thevlang/vlang:alpine AS build
|
|||
|
||||
WORKDIR /tmp/app
|
||||
COPY . .
|
||||
RUN v -prod .
|
||||
RUN v -prod -o highscore-server .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk --no-cache add sqlite-dev
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /tmp/app/highscore-server .
|
||||
COPY --from=build /tmp/app/config.example.toml ./config.toml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue