2020-05-03 17:30:03 +00:00
|
|
|
version: '3.3'
|
2020-05-02 22:54:56 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
gitea:
|
|
|
|
external: false
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
traefik_acme:
|
|
|
|
traefik_logs:
|
|
|
|
|
|
|
|
services:
|
|
|
|
traefik:
|
|
|
|
image: traefik:v2.2
|
2020-05-03 17:30:03 +00:00
|
|
|
environment:
|
|
|
|
DO_AUTH_TOKEN: "{{ DO_AUTH_TOKEN }}"
|
2020-05-02 22:54:56 +00:00
|
|
|
ports:
|
2020-05-03 17:30:03 +00:00
|
|
|
- 80:80/tcp
|
|
|
|
- 443:443/tcp
|
|
|
|
- 8080:8080/tcp
|
2020-05-02 22:54:56 +00:00
|
|
|
volumes:
|
2020-05-03 17:30:03 +00:00
|
|
|
- traefik_acme:/acme
|
|
|
|
- traefik_logs:/log
|
2020-05-02 22:54:56 +00:00
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2020-05-03 17:30:03 +00:00
|
|
|
- /home/josiah/apps/test/traefik.toml:/etc/traefik/traefik.toml
|
2020-05-02 22:54:56 +00:00
|
|
|
deploy:
|
|
|
|
mode: global
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.role == manager
|
|
|
|
labels:
|
2020-05-03 17:30:03 +00:00
|
|
|
- "traefik.enable=true"
|
|
|
|
|
|
|
|
# Dashboard
|
|
|
|
- "traefik.http.routers.awfulAll-traefik-api.rule=Host(`awful-1.awful.club`)&&(PathPrefix(`/dashboard`)"
|
2020-05-02 22:54:56 +00:00
|
|
|
- "traefik.http.routers.awfulAll-traefik-api.service=api@internal"
|
2020-05-03 17:30:03 +00:00
|
|
|
- "traefik.http.routers.awfulAll-traefik-api.entryPoint=https"
|
|
|
|
- "traefik.http.routers.awfulAll-traefik-api.tls.certresolver=awfulAll-resolver"
|
|
|
|
- "traefik.http.routers.awfulAll-traefik-api.tls=true"
|
2020-05-02 22:54:56 +00:00
|
|
|
|
2020-05-03 17:30:03 +00:00
|
|
|
awfulAll-whoami:
|
2020-05-02 22:54:56 +00:00
|
|
|
image: containous/whoami:latest
|
2020-05-03 17:30:03 +00:00
|
|
|
|
2020-05-02 22:54:56 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.awfulAll-whoami.rule=Host(`whoami.awful.club`)"
|
|
|
|
- "traefik.http.routers.awfulAll-whoami.service=awfulAll-whoami"
|
2020-05-03 17:30:03 +00:00
|
|
|
- "traefik.http.routers.awfulAll-whoami.entryPoint=https"
|
|
|
|
- "traefik.http.routers.awfulAll-whoami.tls.certresolver=awfulAll-resolver"
|
|
|
|
- "traefik.http.routers.awfulAll-whoami.tls=true"
|
|
|
|
|
|
|
|
# root-handlers:
|
|
|
|
# image: nginx:1.18
|
|
|
|
# labels:
|
|
|
|
# - "traefik.enable=true"
|
|
|
|
# - "traefik.http.routers.awfulAll-whoami.rule=Host(`whoami.awful.club`)"
|
|
|
|
# - "traefik.http.routers.awfulAll-whoami.service=awfulAll-whoami"
|
|
|
|
# - "traefik.http.routers.awfulAll-whoami.entryPoints=https"
|
|
|
|
# - "traefik.http.routers.awfulAll-whoami.tls.certresolver=awfulAll-resolver"
|
|
|
|
# # - "traefik.http.services.awfulAll-whoami.loadbalancer.server.port=443"
|
|
|
|
# volumes:
|
|
|
|
# - /home/josiah/apps/nginx:/etc/nginx/conf.d
|