parent
fc2c125c3b
commit
eb1491863e
@ -1,61 +1,26 @@
|
|||||||
version: '3.3'
|
version: "3.3"
|
||||||
|
|
||||||
networks:
|
|
||||||
gitea:
|
|
||||||
external: false
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
traefik_acme:
|
|
||||||
traefik_logs:
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
traefik:
|
traefik:
|
||||||
image: traefik:v2.2
|
image: "traefik:v2.2"
|
||||||
|
container_name: "traefik"
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
|
- "8080:8080"
|
||||||
environment:
|
environment:
|
||||||
DO_AUTH_TOKEN: "{{ DO_AUTH_TOKEN }}"
|
DO_AUTH_TOKEN: "{{ DO_AUTH_TOKEN }}"
|
||||||
ports:
|
|
||||||
- 80:80/tcp
|
|
||||||
- 443:443/tcp
|
|
||||||
- 8080:8080/tcp
|
|
||||||
volumes:
|
volumes:
|
||||||
- traefik_acme:/acme
|
- "/home/josiah/apps/test/letsencrypt/:/letsencrypt"
|
||||||
- traefik_logs:/log
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- "/home/josiah/apps/test/traefik.yml:/etc/traefik/traefik.yml"
|
||||||
- /home/josiah/apps/test/traefik.toml:/etc/traefik/traefik.toml
|
|
||||||
deploy:
|
|
||||||
mode: global
|
|
||||||
placement:
|
|
||||||
constraints:
|
|
||||||
- node.role == manager
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
|
|
||||||
# Dashboard
|
whoami:
|
||||||
- "traefik.http.routers.awfulAll-traefik-api.rule=Host(`awful-1.awful.club`)&&(PathPrefix(`/dashboard`)"
|
image: "containous/whoami"
|
||||||
- "traefik.http.routers.awfulAll-traefik-api.service=api@internal"
|
container_name: "simple-service"
|
||||||
- "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"
|
|
||||||
|
|
||||||
awfulAll-whoami:
|
|
||||||
image: containous/whoami:latest
|
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.awfulAll-whoami.rule=Host(`whoami.awful.club`)"
|
- "traefik.http.routers.whoami.rule=Host(`whoami.awful.club`)"
|
||||||
- "traefik.http.routers.awfulAll-whoami.service=awfulAll-whoami"
|
- "traefik.http.routers.whoami.entrypoints=websecure"
|
||||||
- "traefik.http.routers.awfulAll-whoami.entryPoint=https"
|
- "traefik.http.routers.whoami.tls.certresolver=awful-letsencrypt"
|
||||||
- "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
|
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
# defaultEntryPoints must be at the top
|
|
||||||
# because it should not be in any table below
|
|
||||||
|
|
||||||
defaultEntryPoints = ["http", "https"]
|
|
||||||
|
|
||||||
[log]
|
|
||||||
level = "DEBUG"
|
|
||||||
|
|
||||||
[api]
|
|
||||||
dashboard = true
|
|
||||||
insecure = false
|
|
||||||
|
|
||||||
[entryPoints]
|
|
||||||
[entryPoints.http]
|
|
||||||
address = ":80"
|
|
||||||
[entryPoints.https]
|
|
||||||
address = ":443"
|
|
||||||
|
|
||||||
[http.middlewares]
|
|
||||||
[http.middlewares.awfulAll-https-redir.redirectScheme]
|
|
||||||
scheme = "https"
|
|
||||||
permanent = true
|
|
||||||
|
|
||||||
[certificatesResolvers.awfulAll-resolver.acme]
|
|
||||||
storage = "/acme/acme.json"
|
|
||||||
email = "me@jowj.net"
|
|
||||||
caServer = "https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
||||||
|
|
||||||
[certificatesResolvers.awfulAll-resolver.acme.dnsChallenge]
|
|
||||||
provider = "digitalocean"
|
|
||||||
|
|
||||||
|
|
||||||
[providers.docker]
|
|
||||||
|
|
||||||
[docker]
|
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
|
||||||
watch = true
|
|
||||||
exposedbydefault = false
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue