improve script
This commit is contained in:
parent
199376818c
commit
9a06ba637f
|
@ -2,6 +2,7 @@ FROM python:2-alpine
|
||||||
MAINTAINER Henri Dwyer <henri@dwyer.io>
|
MAINTAINER Henri Dwyer <henri@dwyer.io>
|
||||||
|
|
||||||
VOLUME /certs
|
VOLUME /certs
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
RUN apk add --no-cache --virtual .build-deps linux-headers gcc musl-dev\
|
RUN apk add --no-cache --virtual .build-deps linux-headers gcc musl-dev\
|
||||||
&& apk add --no-cache libffi-dev openssl-dev dialog\
|
&& apk add --no-cache libffi-dev openssl-dev dialog\
|
||||||
|
|
|
@ -16,7 +16,7 @@ In docker-compose.yml, change the environment variables:
|
||||||
|
|
||||||
### Using the automated image
|
### Using the automated image
|
||||||
|
|
||||||
docker run --name certbot -p 80 -v `pwd`/certs:/certs --restart always -e "DOMAINS=domain1.com domain2.com" -e "EMAIL=webmaster@domain1.com" -e "CONCAT=true" henridwyer/docker-letsencrypt-cron
|
docker run --name certbot -v `pwd`/certs:/certs --restart always -e "DOMAINS=domain1.com domain2.com" -e "EMAIL=webmaster@domain1.com" -e "CONCAT=true" henridwyer/docker-letsencrypt-cron
|
||||||
|
|
||||||
### Building the image
|
### Building the image
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@ services:
|
||||||
certbot:
|
certbot:
|
||||||
build: .
|
build: .
|
||||||
container_name: certbot
|
container_name: certbot
|
||||||
expose:
|
|
||||||
- 80
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./certs:/certs
|
- ./certs:/certs
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -3,6 +3,7 @@ do
|
||||||
echo "Running certbot for $d"
|
echo "Running certbot for $d"
|
||||||
certbot --standalone --standalone-supported-challenges\
|
certbot --standalone --standalone-supported-challenges\
|
||||||
http-01 --agree-tos --renew-by-default\
|
http-01 --agree-tos --renew-by-default\
|
||||||
|
--text --server https://acme-v01.api.letsencrypt.org/directory\
|
||||||
--email $EMAIL -d $d certonly
|
--email $EMAIL -d $d certonly
|
||||||
ec=$?
|
ec=$?
|
||||||
echo "certbot exit code $ec"
|
echo "certbot exit code $ec"
|
||||||
|
|
Loading…
Reference in New Issue