Skip to content

Commit

Permalink
separeted tls and non-tls
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagostutz committed Jun 6, 2020
1 parent d111304 commit fb2f91f
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 11 deletions.
10 changes: 0 additions & 10 deletions docker-compose.yml

This file was deleted.

File renamed without changes.
21 changes: 21 additions & 0 deletions non-tls/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.5'

services:
traefik-letsencrypt:
image: tiagostutz/traefik-letsencrypt:non-tls-1.7-alpine
build: .
deploy:
mode: global
labels:
- traefik.enable=false
placement:
constraints:
- node.role == manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- LOG_LEVEL=DEBUG
ports:
- 80:80
- 443:443
- 8080:8080
12 changes: 12 additions & 0 deletions non-tls/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

if [ -z $SWARM_MODE ]; then
SWARM_MODE=false
fi

traefik --api --docker --docker.watch --docker.domain=docker.localhost --docker.swarmMode=$SWARM_MODE \
--ping --ping.entryPoint=http \
--metrics.prometheus \
--entrypoints='Name:http Address::80' \
--retry \
--loglevel=$LOG_LEVEL
4 changes: 4 additions & 0 deletions tls/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM traefik:1.7-alpine

ADD startup.sh /startup.sh
CMD ["/startup.sh"]
21 changes: 21 additions & 0 deletions tls/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.5'

services:
traefik-letsencrypt:
image: tiagostutz/traefik-letsencrypt:tls-1.7-alpine
build: .
deploy:
mode: global
labels:
- traefik.enable=false
placement:
constraints:
- node.role == manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- LOG_LEVEL=DEBUG
ports:
- 80:80
- 443:443
- 8080:8080
2 changes: 1 addition & 1 deletion startup.sh → tls/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ traefik --api --docker --docker.watch --docker.domain=docker.localhost --docker
--acme.onhostrule --acme.httpchallenge \
--acme.httpchallenge.entrypoint=http \
--retry \
--loglevel=DEBUG
--loglevel=$LOG_LEVEL

0 comments on commit fb2f91f

Please sign in to comment.