Browse Source

refactor

155-refactor
Steven Foerster 5 years ago
parent
commit
a57c529c73
  1. 16
      extra/bitwarden.yml
  2. 10
      scripts/subinstallers/passwd.sh

16
extra/bitwarden.yml

@ -10,14 +10,14 @@ services: @@ -10,14 +10,14 @@ services:
- ../../mistborn_volumes/extra/bitwarden:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.bitwarden-http.rule=Host(`bitwarden.mistborn`)"
- "traefik.http.routers.bitwarden-http.entrypoints=web"
- "traefik.http.routers.bitwarden-http.middlewares=mistborn_auth@file"
- "traefik.http.routers.bitwarden-https.rule=Host(`bitwarden.mistborn`)"
- "traefik.http.routers.bitwarden-https.entrypoints=websecure"
- "traefik.http.routers.bitwarden-https.middlewares=mistborn_auth@file"
- "traefik.http.routers.bitwarden-https.tls.certresolver=basic"
- "traefik.http.services.bitwarden-service.loadbalancer.server.port=80"
# - "traefik.http.routers.bitwarden-http.rule=Host(`bitwarden.mistborn`)"
# - "traefik.http.routers.bitwarden-http.entrypoints=web"
# - "traefik.http.routers.bitwarden-http.middlewares=mistborn_auth@file"
# - "traefik.http.routers.bitwarden-https.rule=Host(`bitwarden.mistborn`)"
# - "traefik.http.routers.bitwarden-https.entrypoints=websecure"
# - "traefik.http.routers.bitwarden-https.middlewares=mistborn_auth@file"
# - "traefik.http.routers.bitwarden-https.tls.certresolver=basic"
# - "traefik.http.services.bitwarden-service.loadbalancer.server.port=80"
ports:
- 3012:3012/tcp
restart: unless-stopped

10
scripts/subinstallers/passwd.sh

@ -1,20 +1,12 @@ @@ -1,20 +1,12 @@
#!/bin/bash
# INPUT default admin password
while [ -z "${MISTBORN_DEFAULT_PASSWORD}" ]; do
while [ -z "${MISTBORN_DEFAULT_PASSWORD}" ] || [ ${MISTBORN_DEFAULT_PASSWORD} =~ ^[A-Za-z0-9_]+$ ]; do
echo
echo "(Mistborn) The default admin password may only container alphanumeric characters and _"
read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD
echo
if [[ ${MISTBORN_DEFAULT_PASSWORD} =~ ^[A-Za-z0-9_]+$ ]]; then
# it matches
echo "(Mistborn) Password is accepted"
else
unset MISTBORN_DEFAULT_PASSWORD
echo "(Mistborn) Try again"
fi
done
echo

Loading…
Cancel
Save