Add dockerfile, update ping route to alive route, add documentation

This commit is contained in:
froge 2025-02-12 11:55:56 +10:00
parent 0d334bde38
commit a9e265a4f3
Signed by: froge
GPG key ID: A825E09930271BFA
6 changed files with 57 additions and 13 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1
FROM docker.io/golang:1.23
# Create working directory and grab deps
WORKDIR /usr/src/gomusic
COPY go.mod go.sum ./
RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
COPY *.go ./
# Build
# Note that our dependencies require CGO
RUN CGO_ENABLED=1 GOOS=linux go build -v -o /usr/local/bin/gomusic
# Signal which ports we use
EXPOSE 8000
# Run
CMD ["gomusic"]