Compare commits
30 Commits
5863d5b808
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 3dbf0983f6 | |||
| 8587dcc8c2 | |||
| e69f607bf8 | |||
| f9aaaaa624 | |||
| 3e3b548538 | |||
| 53935f50a1 | |||
| a079be7a7c | |||
| daf09c2688 | |||
| 12c5cc0b26 | |||
| afe5564d3e | |||
| e8746b41f8 | |||
| e98549ced0 | |||
| df6719d802 | |||
| da97eed84e | |||
| bc046870b5 | |||
| 51fb94b5d7 | |||
| e6afb009ea | |||
| 6d4ca72071 | |||
| 8b57c507cf | |||
| f4f8bfb64b | |||
| c8daded5b0 | |||
| 6056a0bcd7 | |||
| d2999b8307 | |||
| 5a24a284d0 | |||
| c25786a930 | |||
| 09bdaf819c | |||
| 1773f9d3ee | |||
| 47d5a4aaaf | |||
| 85ec77a260 | |||
| afd88220aa |
@ -1,21 +1,14 @@
|
||||
|
||||
dist: dist-gitea
|
||||
|
||||
builds:
|
||||
- skip: true
|
||||
build:
|
||||
skip: true
|
||||
|
||||
archives:
|
||||
- format: binary
|
||||
|
||||
release:
|
||||
draft: true
|
||||
|
||||
header: |
|
||||
# Certbot Cron v{{ .Tag }}
|
||||
|
||||
## Docker Image:
|
||||
`git.mrmeeb.stream/mrmeeb/certbot-cron:{{ .Tag }}`
|
||||
|
||||
gitea:
|
||||
owner: MrMeeb
|
||||
name: certbot-cron-docker
|
||||
|
||||
12
Dockerfile
12
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM alpine:3.19.1 as base
|
||||
FROM alpine:latest as base
|
||||
ARG TARGETARCH
|
||||
|
||||
FROM base AS base-amd64
|
||||
@ -9,7 +9,7 @@ ENV S6_OVERLAY_ARCH=aarch64
|
||||
|
||||
FROM base-${TARGETARCH}${TARGETVARIANT}
|
||||
|
||||
ARG S6_OVERLAY_VERSION="3.1.6.2"
|
||||
ARG S6_OVERLAY_VERSION=3.1.5.0
|
||||
|
||||
# Core variables
|
||||
ENV PUID=1000
|
||||
@ -17,7 +17,6 @@ ENV PGID=1000
|
||||
ENV TZ=UTC
|
||||
ENV GENERATE_DHPARAM=true
|
||||
ENV INTERVAL="0 */6 * * *"
|
||||
ENV ONE_SHOT=false
|
||||
|
||||
# Single domain
|
||||
ENV DOMAINS=
|
||||
@ -56,12 +55,8 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 S6_VERBOSI
|
||||
RUN python3 -m venv /app/certbot/ && /app/certbot/bin/pip install --upgrade pip
|
||||
|
||||
#Get required packages for building, build, then cleanup
|
||||
#Added additional pip steps to fix cython 3.0.0 issue - https://github.com/yaml/pyyaml/issues/601
|
||||
COPY requirements.txt /app/certbot/requirements.txt
|
||||
RUN apk add --no-cache --virtual .deps gcc python3-dev libc-dev libffi-dev && \
|
||||
/app/certbot/bin/pip install wheel && \
|
||||
/app/certbot/bin/pip install "Cython<3.0" pyyaml --no-build-isolation && \
|
||||
/app/certbot/bin/pip install -r /app/certbot/requirements.txt && \
|
||||
/app/certbot/bin/pip install certbot certbot-dns-cloudflare && \
|
||||
ln -s /app/certbot/bin/certbot /usr/bin/certbot &&\
|
||||
apk del .deps
|
||||
|
||||
@ -70,7 +65,6 @@ COPY root /
|
||||
RUN chmod +x /container-init.sh && \
|
||||
chmod +x /certbot-prepare.sh && \
|
||||
chmod +x /certbot-renew.sh && \
|
||||
chmod +x /check-one-shot.sh && \
|
||||
chown -R ${PUID}:${PGID} /app /config
|
||||
|
||||
ENTRYPOINT [ "/init" ]
|
||||
|
||||
@ -52,10 +52,9 @@ Core options to the container
|
||||
|PUID |int |1000 |Sets the UID of the user certbot runs under |
|
||||
|PGID |int |1000 |Sets the GID of the user certbot runs under |
|
||||
|TZ |[List of valid TZs](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) |UTC |Sets the timezone of the container |
|
||||
| ONE_SHOT | false | Whether container exits after first run of certbot, or starts cron-based auto-renewal |
|
||||
| GENERATE_DHPARAM | true (case-sensitive) | Generate Diffie-Hellman keys in /config/letsencrypt/keys |
|
||||
| INTERVAL | 0 */6 * * * | How often certbot attempts to renew the certificate. Cron syntax |
|
||||
| CERT_COUNT | 1 | How many certificates certbot will try to issue. [Details here](https://git.mrmeeb.stream/MrMeeb/certbot-cron-docker#multiple-certificates) |
|
||||
| CERT_COUNT | 1 | How many certificates certbot will try to issue (more than 1 not yet implemented) |
|
||||
|
||||
### Certificate Options
|
||||
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
{
|
||||
"extends": [":automergeMinor", ":automergePr", ":automergeRequireAllStatusChecks", ":dependencyDashboard", ":disableRateLimiting", ":rebaseStalePrs"],
|
||||
"baseBranches": ["main"],
|
||||
"major": {
|
||||
"dependencyDashboardApproval": true
|
||||
},
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"fileMatch": ["Dockerfile"],
|
||||
"matchStrings": ["ARG S6_OVERLAY_VERSION=[\"](?<currentValue>.*)[\"]"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "just-containers/s6-overlay"
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDatasources": ["github-releases"],
|
||||
"matchDepNames": ["just-containers/s6-overlay"],
|
||||
"extractVersion": "^v(?<version>.*)$",
|
||||
"versioning": "loose"
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": ["certbot"],
|
||||
"groupName": "certbot"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
# For pinning Certbot packages to then be parsed by Renovate
|
||||
|
||||
certbot ==2.9.0
|
||||
certbot-dns-cloudflare ==2.9.0
|
||||
@ -756,24 +756,13 @@ fi
|
||||
|
||||
if [ $GENERATE_DHPARAM = true ] && [ ! -s /config/letsencrypt/keys/ssl-dhparams.pem ]
|
||||
then
|
||||
echo ""
|
||||
echo "Generating Diffie-Hellman keys, saved to /config/letsencrypt/keys. This can take a long time!"
|
||||
openssl dhparam -out /config/letsencrypt/keys/ssl-dhparams.pem 4096
|
||||
fi
|
||||
|
||||
if [ $ONE_SHOT == "true" ]; then
|
||||
echo "$INTERVAL /certbot-renew.sh >> /config/logs/renew.log" > /config/.crontab.txt
|
||||
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
echo "ONE_SHOT is true - exiting container"
|
||||
|
||||
elif [ $ONE_SHOT == "false" ]; then
|
||||
|
||||
echo "$INTERVAL /certbot-renew.sh >> /config/logs/renew.log" > /config/.crontab.txt
|
||||
|
||||
echo ""
|
||||
|
||||
echo "Starting automatic renewal job. Schedule is $INTERVAL"
|
||||
crontab /config/.crontab.txt
|
||||
|
||||
fi
|
||||
echo "Starting automatic renewal job. Schedule is $INTERVAL"
|
||||
crontab /config/.crontab.txt
|
||||
@ -1,9 +0,0 @@
|
||||
#!/command/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ $ONE_SHOT == "true" ]; then
|
||||
|
||||
# Cleanly kill container by sending kill signal to supervisor process
|
||||
kill 1
|
||||
|
||||
fi
|
||||
@ -28,7 +28,6 @@ echo \
|
||||
"PUID=${PUID}
|
||||
PGID=${PGID}
|
||||
TZ=${TZ}
|
||||
ONE_SHOT=${ONE_SHOT}
|
||||
INTERVAL=${INTERVAL}
|
||||
GENERATE_DHPARAM=${GENERATE_DHPARAM}
|
||||
CERT_COUNT=${CERT_COUNT}"
|
||||
|
||||
@ -1 +0,0 @@
|
||||
oneshot
|
||||
@ -1 +0,0 @@
|
||||
exec /check-one-shot.sh
|
||||
Reference in New Issue
Block a user