Last active
March 21, 2021 22:14
-
-
Save DrChai/e35ac6cf04299daf7dda9f66140a9664 to your computer and use it in GitHub Desktop.
docker-acme.sh-nginx-proxy-companion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
acme: | |
container_name: acme | |
build: acme | |
environment: | |
- DO_API_KEY=aaaaabbbbb85c25267308f1bc89 | |
- LETSENCRYPT_DNS=dns_dgon | |
- LETSENCRYPT_HOST=example.com | |
- ACCOUNTEMAIL=example@gmail.com | |
volumes: | |
- ./data/acme:/acme.sh | |
- ./certs:/certs | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx-proxy | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ./certs:/etc/nginx/certs:ro | |
networks: | |
default: | |
external: | |
name: ${NETWORK:-webproxy} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM neilpang/acme.sh | |
ADD ./new_entry.sh /new_entry.sh | |
RUN chmod +x /new_entry.sh | |
ENTRYPOINT ["/new_entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
echo "ISSUE $LETSENCRYPT_HOST WITH DNS $LETSENCRYPT_DNS" | |
acme.sh --issue --dns $LETSENCRYPT_DNS -d $LETSENCRYPT_HOST -d *.$LETSENCRYPT_HOST --cert-file /certs/$LETSENCRYPT_HOST.crt --key-file /certs/$LETSENCRYPT_HOST.key | |
echo "RUN ORIGINAL entry.sh AS DAEMON" | |
/entry.sh daemon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment