Customizations
This commit is contained in:
parent
b621ba06ed
commit
d77ba8c122
17
Dockerfile
17
Dockerfile
|
@ -1,21 +1,18 @@
|
|||
FROM python:2-alpine
|
||||
FROM python:2
|
||||
MAINTAINER Henri Dwyer <henri@dwyer.io>
|
||||
|
||||
VOLUME /certs
|
||||
VOLUME /etc/letsencrypt
|
||||
EXPOSE 80
|
||||
|
||||
RUN apk add --no-cache --virtual .build-deps linux-headers gcc musl-dev\
|
||||
&& apk add --no-cache libffi-dev openssl-dev dialog\
|
||||
&& pip install certbot\
|
||||
&& apk del .build-deps\
|
||||
&& mkdir /scripts
|
||||
RUN apt update && apt install -y cron
|
||||
RUN pip install certbot
|
||||
RUN mkdir /scripts
|
||||
|
||||
ADD crontab /etc/crontabs
|
||||
RUN crontab /etc/crontabs/crontab
|
||||
ADD ./crontab /etc/cron.d/certbot
|
||||
RUN crontab /etc/cron.d/certbot
|
||||
|
||||
COPY ./scripts/ /scripts
|
||||
RUN chmod +x /scripts/run_certbot.sh
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD ["crond", "-f"]
|
||||
CMD ["/scripts/entrypoint.sh"]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
all: build
|
||||
|
||||
build: Makefile Dockerfile
|
||||
docker build --squash -t staticfloat/docker-letsencrypt-cron .
|
||||
|
||||
push: build
|
||||
docker push staticfloat/docker-letsencrypt-cron
|
2
crontab
2
crontab
|
@ -1 +1 @@
|
|||
0 3 1 */2 * root sh /scripts/run_certbot.sh
|
||||
0 */12 * * * root sh /scripts/run_certbot.sh
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
version: '2'
|
||||
|
||||
services:
|
||||
# Example docker-compose service
|
||||
certbot:
|
||||
build: .
|
||||
container_name: certbot
|
||||
|
@ -11,5 +12,5 @@ services:
|
|||
- WEBROOT=""
|
||||
- DOMAINS=domain1.com domain2.com
|
||||
- EMAIL=webmaster@domain1.com
|
||||
- CONCAT=true
|
||||
- CONCAT=false
|
||||
- SEPARATE=true
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
/scripts/run_certbot.sh
|
||||
crond -f
|
Loading…
Reference in New Issue