about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-21 10:54:37 +0200
committerEmile <hanemile@protonmail.com>2019-10-21 10:54:37 +0200
commit43334c4d51b31f522e9f72b7c47a70bbb0c7ad0e (patch)
treeadafd1553e13360e4b8f8d1b6e61a0d001cc41af
parentad8accf1018961bbb1c6421caee963f740110633 (diff)
traefik creds
-rwxr-xr-xsetup.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh
index 18db0f1..b05f0c4 100755
--- a/setup.sh
+++ b/setup.sh
@@ -16,6 +16,15 @@ read -e -p "CTFNAME: " -i "FlexCTF" CTFNAME
 echo "HOSTNAME=$HOSTNAME" > .env
 echo "CTFNAME=$CTFNAME" >> .env
 
+# Read Traefik creds from the user
+read -e -p "Traefik username: " -i "traefik" TRAEFIK_USER
+read -e -p "Traefik password: " -i "secret" TRAEFIK_PASSWORD
+
+# Create the traefik creds string (user:pass)
+TRAEFIK_CREDS=$(htpasswd -nb $TRAEFIK_USER $TRAEFIK_PASSWORD)
+
+echo TRAEFIK_CREDS >> traefik_users
+
 # Grafana settings
 read -e -p "Grafana server: " -i "https://grafana.$HOSTNAME:3000" GF_SERVER_ROOT_URL
 read -e -p "Grafana admin pwd: " -i "secret" GF_SECURITY_ADMIN_PASSWORD