Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of WOODPECKER_DATABASE_DATASOURCE_FILE #3404

Merged
merged 6 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/Dockerfile.server.alpine.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ ENV CA_CERTIFICATES_VERSION="20230506-r0"
ARG TARGETOS TARGETARCH
RUN apk add -U --no-cache ca-certificates=${CA_CERTIFICATES_VERSION}
ENV GODEBUG=netdns=go
ENV WOODPECKER_DATABASE_DATASOURCE=/var/lib/woodpecker/woodpecker.sqlite
# create datasource config file
RUN echo -n "/var/lib/woodpecker/woodpecker.sqlite" > /etc/woodpecker-datasource.conf
anbraten marked this conversation as resolved.
Show resolved Hide resolved
ENV WOODPECKER_DATABASE_DATASOURCE_FILE=/etc/woodpecker-datasource.conf
ENV WOODPECKER_DATABASE_DRIVER=sqlite3
ENV XDG_CACHE_HOME=/var/lib/woodpecker
ENV XDG_DATA_HOME=/var/lib/woodpecker
Expand Down
8 changes: 7 additions & 1 deletion docker/Dockerfile.server.multiarch
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22 AS certs

FROM docker.io/alpine:3.19 AS conf
# create datasource config file
RUN echo -n "/var/lib/woodpecker/woodpecker.sqlite" > /etc/woodpecker-datasource.conf

FROM scratch
ARG TARGETOS TARGETARCH
ENV GODEBUG=netdns=go
ENV WOODPECKER_DATABASE_DATASOURCE=/var/lib/woodpecker/woodpecker.sqlite
ENV WOODPECKER_DATABASE_DATASOURCE_FILE=/etc/woodpecker-datasource.conf
ENV WOODPECKER_DATABASE_DRIVER=sqlite3
ENV XDG_CACHE_HOME=/var/lib/woodpecker
ENV XDG_DATA_HOME=/var/lib/woodpecker
EXPOSE 8000 9000 80 443

# copy datasource config from conf image
COPY --from=conf /etc/woodpecker-datasource.conf /etc/woodpecker-datasource.conf
# copy certs from certs image
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
# copy server binary
Expand Down