Skip to content

Commit

Permalink
SSL certs auto-renew fix (#27)
Browse files Browse the repository at this point in the history
* fix on ssl certs auto-renew

* Update nginx/bin/entrypoint.sh

Co-authored-by: Matthieu Petiteau <[email protected]>

* Update nginx/Dockerfile

Co-authored-by: Matthieu Petiteau <[email protected]>

Co-authored-by: Matthieu Petiteau <[email protected]>
  • Loading branch information
Dophy6 and smallwat3r authored Dec 14, 2022
1 parent ee6ff80 commit f18e100
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
FROM nginx:1.19-alpine

# Install certbot for letsencrypt certificates
RUN apk add --no-cache certbot
# Install also an init handler for alpine cron
RUN apk add --no-cache certbot openrc busybox-initscripts

# Replace existing files by our own configs
RUN rm /etc/nginx/nginx.conf && rm /etc/nginx/conf.d/default.conf
Expand Down
4 changes: 2 additions & 2 deletions nginx/bin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

certbot certonly --standalone -d $1 --email $2 -n --agree-tos --expand
/usr/sbin/nginx -g "daemon off;"
/usr/sbin/crond -f -d 8 &
/usr/sbin/crond -f &
/usr/sbin/nginx -g "daemon off;" # this is run in the foreground, so need to be last

0 comments on commit f18e100

Please sign in to comment.