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>
|
MAINTAINER Henri Dwyer <henri@dwyer.io>
|
||||||
|
|
||||||
VOLUME /certs
|
|
||||||
VOLUME /etc/letsencrypt
|
VOLUME /etc/letsencrypt
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .build-deps linux-headers gcc musl-dev\
|
RUN apt update && apt install -y cron
|
||||||
&& apk add --no-cache libffi-dev openssl-dev dialog\
|
RUN pip install certbot
|
||||||
&& pip install certbot\
|
RUN mkdir /scripts
|
||||||
&& apk del .build-deps\
|
|
||||||
&& mkdir /scripts
|
|
||||||
|
|
||||||
ADD crontab /etc/crontabs
|
ADD ./crontab /etc/cron.d/certbot
|
||||||
RUN crontab /etc/crontabs/crontab
|
RUN crontab /etc/cron.d/certbot
|
||||||
|
|
||||||
COPY ./scripts/ /scripts
|
COPY ./scripts/ /scripts
|
||||||
RUN chmod +x /scripts/run_certbot.sh
|
RUN chmod +x /scripts/run_certbot.sh
|
||||||
|
|
||||||
ENTRYPOINT []
|
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'
|
version: '2'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# Example docker-compose service
|
||||||
certbot:
|
certbot:
|
||||||
build: .
|
build: .
|
||||||
container_name: certbot
|
container_name: certbot
|
||||||
|
@ -11,5 +12,5 @@ services:
|
||||||
- WEBROOT=""
|
- WEBROOT=""
|
||||||
- DOMAINS=domain1.com domain2.com
|
- DOMAINS=domain1.com domain2.com
|
||||||
- EMAIL=webmaster@domain1.com
|
- EMAIL=webmaster@domain1.com
|
||||||
- CONCAT=true
|
- CONCAT=false
|
||||||
- SEPARATE=true
|
- SEPARATE=true
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
/scripts/run_certbot.sh
|
||||||
|
crond -f
|
Loading…
Reference in New Issue