Add dockerfile, update ping route to alive route, add documentation
This commit is contained in:
parent
0d334bde38
commit
a9e265a4f3
6 changed files with 57 additions and 13 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal 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"]
|
Loading…
Add table
Add a link
Reference in a new issue