feat: embed default tmdb api key

This commit is contained in:
Simon Ding
2025-03-19 10:49:05 +08:00
parent ca06e560e3
commit be86fd05e1
6 changed files with 24 additions and 7 deletions

View File

@@ -6,6 +6,8 @@ ENV GO111MODULE=on
WORKDIR /app
ARG TMDB_API_KEY
COPY go.mod .
COPY go.sum .
RUN go mod download
@@ -13,7 +15,7 @@ RUN go mod download
COPY . .
# 指定OS等并go build
RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long)" ./cmd/
RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long) -X polaris/db.TmdbApiKey=$(echo $TMDB_API_KEY)" ./cmd/
FROM debian:stable-slim