-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from mhabegger/update-readme-aclname-stack
Add aclName label, stack file examples and update README
- Loading branch information
Showing
3 changed files
with
139 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
# From http://proxy.dockerflow.com/swarm-mode-stack/ | ||
proxy: | ||
image: vfarcic/docker-flow-proxy | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
networks: | ||
- proxy | ||
environment: | ||
- LISTENER_ADDRESS=swarm-listener | ||
- MODE=swarm | ||
deploy: | ||
replicas: 2 | ||
|
||
swarm-listener: | ||
image: vfarcic/docker-flow-swarm-listener | ||
networks: | ||
- proxy | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
environment: | ||
- DF_NOTIFY_CREATE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/reconfigure | ||
- DF_NOTIFY_REMOVE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/remove | ||
deploy: | ||
placement: | ||
constraints: [node.role == manager] | ||
|
||
# Let's Encrypt Companion | ||
letsencrypt-companion: | ||
image: hamburml/docker-flow-letsencrypt:latest | ||
networks: | ||
- proxy | ||
environment: | ||
- DOMAIN_1=('haembi.de' 'www.haembi.de' 'blog.haembi.de') | ||
- DOMAIN_2=('michael-hamburger.de' 'www.michael-hamburger.de' 'blog.michael-hamburger.de') | ||
- DOMAIN_COUNT=2 | ||
- CERTBOT_EMAIL=your.mail@mail.de | ||
- PROXY_ADDRESS=proxy | ||
- CERTBOT_CRON_RENEW=('0 3 * * *' '0 15 * * *') | ||
volumes: | ||
- /etc/letsencrypt:/etc/letsencrypt | ||
deploy: | ||
labels: | ||
- com.df.aclName=__acme_letsencrypt_companion # arbitrary aclName to make sure it's on top on HAProxy's list | ||
- com.df.servicePath=/.well-known/acme-challenge | ||
- com.df.notify=true | ||
- com.df.distribute=true | ||
- com.df.port=80 | ||
placement: | ||
constraints: [node.id == <nodeId>] | ||
replicas: 1 | ||
|
||
networks: | ||
proxy: | ||
external: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
# Let's Encrypt Companion | ||
letsencrypt-companion: | ||
image: hamburml/docker-flow-letsencrypt:latest | ||
networks: | ||
- proxy | ||
environment: | ||
- DOMAIN_1=('haembi.de' 'www.haembi.de' 'blog.haembi.de') | ||
- DOMAIN_2=('michael-hamburger.de' 'www.michael-hamburger.de' 'blog.michael-hamburger.de') | ||
- DOMAIN_COUNT=2 | ||
- CERTBOT_EMAIL=your.mail@mail.de | ||
- PROXY_ADDRESS=proxy | ||
- CERTBOT_CRON_RENEW=('0 3 * * *' '0 15 * * *') | ||
volumes: | ||
- /etc/letsencrypt:/etc/letsencrypt | ||
deploy: | ||
labels: | ||
- com.df.aclName=__acme_letsencrypt_companion # arbitrary aclName to make sure it's on top on HAProxy's list | ||
- com.df.servicePath=/.well-known/acme-challenge | ||
- com.df.notify=true | ||
- com.df.distribute=true | ||
- com.df.port=80 | ||
placement: | ||
constraints: [node.id == <nodeId>] | ||
replicas: 1 | ||
|
||
networks: | ||
proxy: | ||
external: true |