32 Commits

Author SHA1 Message Date
def9460540 Merge pull request '1.1.1' (#6) from develop into master
Some checks reported errors
continuous-integration/drone/tag Build was killed
Reviewed-on: #6
2023-07-16 18:07:08 +00:00
3e37a8c4ed further small tweak to log formatting 2023-07-16 17:39:48 +00:00
3dbf0983f6 Merge pull request '1.1.0' (#5) from develop into master
Some checks failed
continuous-integration/drone/tag Build is failing
Reviewed-on: #5
2023-07-16 17:08:41 +00:00
8587dcc8c2 tweak log formatting 2023-07-16 16:45:36 +00:00
e69f607bf8 add multi-certificate support 2023-07-16 15:37:12 +00:00
f9aaaaa624 enable tracking of env vars between runs 2023-07-15 16:04:45 +00:00
3e3b548538 add standalone and webroot methods 2023-07-09 21:53:06 +00:00
53935f50a1 Merge pull request '1.0.0' (#4) from develop into master
Some checks failed
continuous-integration/drone/tag Build is failing
Reviewed-on: #4
2023-06-21 18:20:15 +00:00
a079be7a7c make CLOUDFLARE_TOKEN override instead of append 2023-06-21 17:48:29 +00:00
daf09c2688 add CLOUDFLARE_TOKEN to env vars 2023-06-21 17:32:17 +00:00
12c5cc0b26 add build dependencies for arm 2023-06-20 22:14:44 +00:00
afe5564d3e update readme 2023-06-20 21:27:42 +00:00
e8746b41f8 update build logic 2023-06-20 21:27:36 +00:00
e98549ced0 add goreleaser 2023-06-20 21:27:27 +00:00
df6719d802 change to s6 2023-06-20 21:27:01 +00:00
da97eed84e change to alpine 2023-06-20 21:26:11 +00:00
bc046870b5 Update 'README.md' 2023-01-02 16:40:31 +00:00
51fb94b5d7 Update '.drone.yml' 2022-12-25 20:38:20 +00:00
e6afb009ea Update '.drone.yml' 2022-12-25 19:18:06 +00:00
6d4ca72071 Update 'README.md' 2022-12-25 19:09:13 +00:00
8b57c507cf Update 'README.md' 2022-12-25 19:07:54 +00:00
f4f8bfb64b Add '.drone.yml' 2022-12-25 18:50:54 +00:00
c8daded5b0 Update 'README.md' 2022-12-25 18:48:33 +00:00
6056a0bcd7 Update 'README.md' 2022-06-21 16:56:35 +00:00
d2999b8307 Prevented dhparams regenerating if they already exist 2022-06-21 11:58:46 +00:00
5a24a284d0 Formatting 2022-06-20 22:42:29 +00:00
c25786a930 Add GENERATE_DHPARAM 2022-06-20 22:41:27 +00:00
09bdaf819c Added PROPOGATION_TIME variable 2022-06-20 22:08:30 +00:00
1773f9d3ee Update 'README.md' 2022-06-19 17:11:20 +00:00
47d5a4aaaf Fix typo 2022-06-18 23:12:11 +00:00
85ec77a260 Formatting fix 2022-06-18 23:10:07 +00:00
afd88220aa first commit 2022-06-18 23:08:39 +00:00
10 changed files with 4 additions and 32 deletions

View File

@ -17,7 +17,6 @@ ENV PGID=1000
ENV TZ=UTC ENV TZ=UTC
ENV GENERATE_DHPARAM=true ENV GENERATE_DHPARAM=true
ENV INTERVAL="0 */6 * * *" ENV INTERVAL="0 */6 * * *"
ENV ONE_SHOT=false
# Single domain # Single domain
ENV DOMAINS= ENV DOMAINS=
@ -56,10 +55,7 @@ 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 RUN python3 -m venv /app/certbot/ && /app/certbot/bin/pip install --upgrade pip
#Get required packages for building, build, then cleanup #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
RUN apk add --no-cache --virtual .deps gcc python3-dev libc-dev libffi-dev && \ 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 certbot certbot-dns-cloudflare && \ /app/certbot/bin/pip install certbot certbot-dns-cloudflare && \
ln -s /app/certbot/bin/certbot /usr/bin/certbot &&\ ln -s /app/certbot/bin/certbot /usr/bin/certbot &&\
apk del .deps apk del .deps
@ -69,7 +65,6 @@ COPY root /
RUN chmod +x /container-init.sh && \ RUN chmod +x /container-init.sh && \
chmod +x /certbot-prepare.sh && \ chmod +x /certbot-prepare.sh && \
chmod +x /certbot-renew.sh && \ chmod +x /certbot-renew.sh && \
chmod +x /check-one-shot.sh && \
chown -R ${PUID}:${PGID} /app /config chown -R ${PUID}:${PGID} /app /config
ENTRYPOINT [ "/init" ] ENTRYPOINT [ "/init" ]

View File

@ -52,7 +52,6 @@ Core options to the container
|PUID |int |1000 |Sets the UID of the user certbot runs under | |PUID |int |1000 |Sets the UID of the user certbot runs under |
|PGID |int |1000 |Sets the GID 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 | |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 | | 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 | | INTERVAL | 0 */6 * * * | How often certbot attempts to renew the certificate. Cron syntax |
| CERT_COUNT | 1 | How many certificates certbot will try to issue (more than 1 not yet implemented) | | CERT_COUNT | 1 | How many certificates certbot will try to issue (more than 1 not yet implemented) |

View File

@ -761,19 +761,9 @@ then
openssl dhparam -out /config/letsencrypt/keys/ssl-dhparams.pem 4096 openssl dhparam -out /config/letsencrypt/keys/ssl-dhparams.pem 4096
fi fi
if [ $ONE_SHOT == "true" ]; then
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 "$INTERVAL /certbot-renew.sh >> /config/logs/renew.log" > /config/.crontab.txt
echo "" echo ""
echo "Starting automatic renewal job. Schedule is $INTERVAL" echo "Starting automatic renewal job. Schedule is $INTERVAL"
crontab /config/.crontab.txt crontab /config/.crontab.txt
fi

View File

@ -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

View File

@ -28,7 +28,6 @@ echo \
"PUID=${PUID} "PUID=${PUID}
PGID=${PGID} PGID=${PGID}
TZ=${TZ} TZ=${TZ}
ONE_SHOT=${ONE_SHOT}
INTERVAL=${INTERVAL} INTERVAL=${INTERVAL}
GENERATE_DHPARAM=${GENERATE_DHPARAM} GENERATE_DHPARAM=${GENERATE_DHPARAM}
CERT_COUNT=${CERT_COUNT}" CERT_COUNT=${CERT_COUNT}"

View File

@ -1 +0,0 @@
oneshot

View File

@ -1 +0,0 @@
exec /check-one-shot.sh