This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# -------- Dockerfile (Multi-Stage Build) --------
|
||||
# 1. Builder-Stage
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.* ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /bin/autovoice
|
||||
|
||||
# 2. Runtime-Stage
|
||||
FROM alpine:3.22
|
||||
|
||||
# HTTPS-Callouts in Alpine brauchen ca-certificates
|
||||
RUN apk add --no-cache ca-certificates
|
||||
#RUN mkdir /data
|
||||
#RUN mkdir /dynamicsrc
|
||||
#RUN mkdir /tempsrc
|
||||
COPY --from=builder /bin/autovoice /bin/autovoice
|
||||
#COPY ./static /data/static
|
||||
# COPY ./static /tempsrc/static
|
||||
#COPY ./dynamicsrc /dynamicsrc
|
||||
|
||||
# Default listens on :8080 – siehe main.go
|
||||
EXPOSE 8080
|
||||
|
||||
# Environment defaults; können per compose überschrieben werden
|
||||
ENV LOBBY_CHANNEL_ID=0 \
|
||||
DISCORD_TOKEN=0 \
|
||||
GUILD_ID=0 \
|
||||
TIMEOUT_MIN=1
|
||||
|
||||
|
||||
|
||||
ENTRYPOINT ["/bin/autovoice"]
|
Reference in New Issue
Block a user