mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-22 05:02:58 -05:00
19 lines
340 B
Text
19 lines
340 B
Text
|
FROM golang:1.20.3 as builder
|
||
|
|
||
|
# Create and change to the app directory.
|
||
|
WORKDIR /app
|
||
|
COPY go.* ./
|
||
|
RUN go mod download
|
||
|
|
||
|
COPY . ./
|
||
|
|
||
|
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
|
||
|
|
||
|
FROM alpine:3
|
||
|
RUN apk add --no-cache ca-certificates
|
||
|
|
||
|
COPY --from=builder /app/server /server
|
||
|
ENV PORT=8080
|
||
|
EXPOSE 8080
|
||
|
|
||
|
ENTRYPOINT ["/server"]
|