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

10
scripts/subinstallers/passwd.sh

@ -1,20 +1,12 @@
#!/bin/bash #!/bin/bash
# INPUT default admin password # 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
echo "(Mistborn) The default admin password may only container alphanumeric characters and _" echo "(Mistborn) The default admin password may only container alphanumeric characters and _"
read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD read -p "(Mistborn) Set default admin password: " -s MISTBORN_DEFAULT_PASSWORD
echo 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 done
echo echo

Loading…
Cancel
Save