2023-12-19 05:10:22 +00:00
|
|
|
FROM docker.io/alpine:3.19
|
2022-07-17 07:41:32 +00:00
|
|
|
|
2023-11-01 22:46:03 +00:00
|
|
|
# renovate: datasource=repology depName=alpine_3_18/ca-certificates versioning=loose
|
|
|
|
ENV CA_CERTIFICATES_VERSION="20230506-r0"
|
|
|
|
|
2022-03-01 15:40:24 +00:00
|
|
|
ARG TARGETOS TARGETARCH
|
2023-11-01 22:46:03 +00:00
|
|
|
RUN apk add -U --no-cache ca-certificates=${CA_CERTIFICATES_VERSION}
|
2017-09-28 02:01:52 +00:00
|
|
|
ENV GODEBUG=netdns=go
|
2021-10-28 19:02:43 +00:00
|
|
|
ENV WOODPECKER_DATABASE_DATASOURCE=/var/lib/woodpecker/woodpecker.sqlite
|
Clean up config environment variables for server and agent (#218)
The goal here is to make consistent use of configuration environment variables prefixed `WOODPECKER_`. Where several variants existed, this PR aims to remove all but one option, leaving the most explicit.
This PR only changes server and agent code, but not documentation, in order to keep the PR digestible. Once we have consensus that this is correct, I'll change docs accordingly.
User (rather: admin) facing changes in this PR:
- In general, support for all server and agent config environment variables (env vars) starting with `DRONE_` is removed. The according `WOODPECKER_*` variables must be used instead.
- The env var `WOODPECKER_HOST` replaces `DRONE_HOST`, and `DRONE_SERVER_HOST`.
- The env var `WOODPECKER_AGENT_SECRET` is used to configure the shared secret which agents use to authenticate against the server. It replaces `WOODPECKER_SECRET`, `DRONE_SECRET`, `WOODPECKER_PASSWORD`, `DRONE_PASSWORD`, and `DRONE_AGENT_SECRET`.
- The env var `WOODPECKER_DATABASE_DRIVER` replaces `DRONE_DATABASE_DRIVER` and `DATABASE_DRIVER`.
- The env var `WOODPECKER_DATABASE_DATASOURCE` replaces `DRONE_DATABASE_DATASOURCE` and `DATABASE_CONFIG`.
2021-09-28 13:43:44 +00:00
|
|
|
ENV WOODPECKER_DATABASE_DRIVER=sqlite3
|
2021-10-28 19:02:43 +00:00
|
|
|
ENV XDG_CACHE_HOME=/var/lib/woodpecker
|
2022-09-04 01:24:42 +00:00
|
|
|
ENV XDG_DATA_HOME=/var/lib/woodpecker
|
2022-03-01 15:40:24 +00:00
|
|
|
EXPOSE 8000 9000 80 443
|
2017-09-28 02:01:52 +00:00
|
|
|
|
2023-12-29 19:30:20 +00:00
|
|
|
COPY dist/server/${TARGETOS}_${TARGETARCH}/woodpecker-server /bin/
|
2017-09-28 02:01:52 +00:00
|
|
|
|
2023-07-25 13:55:29 +00:00
|
|
|
HEALTHCHECK CMD ["/bin/woodpecker-server", "ping"]
|
2021-09-21 15:06:13 +00:00
|
|
|
ENTRYPOINT ["/bin/woodpecker-server"]
|