-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 820 Bytes
/
Dockerfile
File metadata and controls
40 lines (29 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# syntax=docker/dockerfile:1
FROM golang:1.22.2
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY auth ./auth
COPY config ./config
COPY db ./db
COPY docs ./docs
COPY handlers ./handlers
COPY models ./models
COPY services ./services
COPY setup ./setup
COPY utils ./utils
COPY webhooks ./webhooks
COPY data ./data
COPY web-ui ./web-ui
COPY config.yaml key.pem cert.pem main.go rsakey.pem build.sh run.sh ./
ENV CGO_ENABLED=1
ENV GOOS=linux
RUN go build -o dingus-server
# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
# But we can document in the Dockerfile what ports
# the application is going to listen on by default.
# https://docs.docker.com/reference/dockerfile/#expose
EXPOSE 443
# Run
CMD ["/app/run.sh"]