Get a docker-compose file going

This commit is contained in:
Luke Murphy 2020-04-25 12:08:00 +02:00
parent 8dda0aefce
commit cb029ea269
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 33 additions and 2 deletions

31
docker-compose.yml Normal file
View File

@ -0,0 +1,31 @@
---
version: "3.3"
services:
traefik:
image: "traefik:v2.2"
restart: "always"
container_name: "traefik"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
# use https://github.com/Tecnativa/docker-socket-proxy later
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
- "./traefik.yml:/traefik.yml"
networks:
- proxy
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`traefik.swarm.autonomic.zone`)"
- "traefik.http.routers.api.service=api@internal"
networks:
proxy:
external: true
volumes:
letsencrypt:

View File

@ -8,7 +8,7 @@ providers:
# endpoint: "tcp://dockerproxy:2375"
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: "traefik"
network: "proxy"
swarmMode: true
domain: "traefik.swarm.autonomic.zone"
@ -28,6 +28,6 @@ certificatesResolvers:
myresolver:
acme:
email: "helo@autonomic.zone"
storage: "acme.json"
storage: "/letsencrypt/acme.json"
# staging enabled, delete to go to production mode
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"