Manuel
7749b7c159
* 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
15 lines
310 B
Docker
15 lines
310 B
Docker
FROM thevlang/vlang:alpine AS build
|
|
|
|
WORKDIR /tmp/app
|
|
COPY . .
|
|
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
|
|
|
|
ENTRYPOINT [ "./highscore-server" ]
|