-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.21.4 AS Build | ||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY *.go ./ | ||
COPY cmd ./cmd | ||
COPY pkg ./pkg | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /gpodder2go | ||
|
||
FROM alpine:3.18.4 | ||
RUN mkdir /data | ||
WORKDIR /data | ||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /data | ||
COPY --from=Build /gpodder2go /gpodder2go | ||
EXPOSE 3005 | ||
VOLUME /data | ||
CMD ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
if [ ! -f "/data/g2g.db" ]; then | ||
echo "No database found, intializing gpodder2go ..." | ||
/gpodder2go init | ||
echo "... database initialized" | ||
fi | ||
if [ ! -f "/data/VERIFIER_SECRET_KEY" ]; then | ||
echo "VERIFIER_SECRET_KEY not found, intializing VERIFIER_SECRET_KEY ..." | ||
cat /dev/urandom | head -c 30 | base64 > /data/VERIFIER_SECRET_KEY | ||
echo "... VERIFIER_SECRET_KEY initialized" | ||
fi | ||
VERIFIER_SECRET_KEY="$(cat /data/VERIFIER_SECRET_KEY)" /gpodder2go serve --addr "${ADDR:-0.0.0.0:3005}" |