FROM thevlang/vlang:alpine AS build
WORKDIR /tmp/app
COPY . .
RUN v -prod -ldflags "-s -w" -o highscore-server .
FROM alpine:latest
RUN apk --no-cache add sqlite-libs
WORKDIR /app
COPY --from=build /tmp/app/highscore-server .
COPY ./config.example.toml ./config.toml
ENTRYPOINT [ "./highscore-server" ]