about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-10 19:10:26 +0200
committerEmile <hanemile@protonmail.com>2019-10-10 19:10:26 +0200
commit11e00a003f0da3a02ed2652d0db5f0d43cbbc08e (patch)
tree972d2d0e7e633d2c151dae51f3f6681535a1aeaa
parent45836b2cfa81f604964c67af101e667b80778b83 (diff)
parent520949754c8f033a864cb8ed0b194e5faa3d4ff5 (diff)
Merge branch 'master' of git.darknebu.la:circus/circus-compose
-rw-r--r--.gitignore1
-rw-r--r--docker-compose.yml7
-rw-r--r--traefik_users5
3 files changed, 12 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index ccc90aa..75d0e26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 letsencrypt/
+*.env
diff --git a/docker-compose.yml b/docker-compose.yml
index e51cee8..0514cbe 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -10,7 +10,9 @@ services:
             - "--providers.docker.exposedbydefault=false"
             - "--entrypoints.web.address=:80"
             - "--entrypoints.websecure.address=:443"
-            - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
+            - "--certificatesresolvers.mytlschallenge.acme.dnschallenge=true"
+            - "--certificatesresolvers.mytlschallenge.acme.dnschallenge.delaybeforecheck=0"
+            - "--certificatesresolvers.mytlschallenge.acme.dnschallenge.provider=cloudflare"
             - "--certificatesresolvers.mytlschallenge.acme.email=hanemile@protonmail.com"
             - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json"
             - "--metrics.prometheus=true"
@@ -21,14 +23,17 @@ services:
         volumes:
             - "./letsencrypt:/letsencrypt"
             - "/var/run/docker.sock:/var/run/docker.sock:ro"
+            - "./traefik_users:/traefik_users"
         labels:
             - "traefik.enable=true"
             - "traefik.http.routers.traefik.entrypoints=web"
             - "traefik.http.routers.traefik.rule=Host(`traefik.${HOSTNAME}`)"
+            - "traefik.http.middlewares.traefik-auth.basicauth.usersFile=/traefik_users"
             - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
             - "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
             - "traefik.http.routers.traefik-secure.entrypoints=websecure"
             - "traefik.http.routers.traefik-secure.rule=Host(`traefik.${HOSTNAME}`)"
+            - "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
             - "traefik.http.routers.traefik-secure.tls=true"
             - "traefik.http.routers.traefik-secure.tls.certresolver=mytlschallenge"
             - "traefik.http.routers.traefik-secure.service=api@internal"
diff --git a/traefik_users b/traefik_users
new file mode 100644
index 0000000..140b1a5
--- /dev/null
+++ b/traefik_users
@@ -0,0 +1,5 @@
+# insert traefik users here
+#
+# Generate user:pass:
+# $ htpasswd -nb user password
+