From 5b12c94a1193ec06f9814eadd72f64a9315b7cca Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Fri, 13 Aug 2021 12:49:02 +0200 Subject: [PATCH] =?UTF-8?q?added=20working=20deployment=20with=20Tr=C3=A6f?= =?UTF-8?q?ik?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + docker-compose.yml | 21 +++++++++++++++++++++ env.example | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml create mode 100644 env.example diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1f727f8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3" + +services: + nyx: + container_name: ${TOTP_CONTAINER_NAME} + image: bryanpedini/go-totp:${TOTP_VERSION} + labels: + - traefik.enable=true + ### Section HTTP + - traefik.routers.http-totp_bjphoster_com.entrypoints=http + # redirect to HTTPS only + - traefik.http.routers.http-get_bjphoster_com.middlewares=http-to-https + - traefik.http.routers.http-get_bjphoster_com.rule=Host(`totp.bjphoster.com`) + ### Section HTTPS + - traefik.http.routers.https-get_bjphoster_com.entrypoints=https + # configure the exposed service + - traefik.http.routers.https-get_bjphoster_com.rule=Host(`totp.bjphoster.com`) + # of course, enable TLS and it's certificate provider + - traefik.http.routers.https-get_bjphoster_com.tls=true + - traefik.http.routers.https-get_bjphoster_com.tls.certresolver=letsencrypt + restart: unless-stopped diff --git a/env.example b/env.example new file mode 100644 index 0000000..68b3ee7 --- /dev/null +++ b/env.example @@ -0,0 +1,2 @@ +TOTP_CONTAINER_NAME=totp.bjphoster.com +TOTP_VERSION=latest