Compare commits

...

4 Commits

Author SHA1 Message Date
Steven Foerster d1523b914a sync cli 5 years ago
Steven Foerster 195d4923d7 typos 5 years ago
Steven Foerster 4b268de68c checkouts 5 years ago
Steven Foerster a57c529c73 refactor 5 years ago
  1. 16
      extra/bitwarden.yml
  2. 2
      modules/mistborn-cli
  3. 6
      scripts/subinstallers/extra/bitwarden.sh
  4. 10
      scripts/subinstallers/passwd.sh
  5. 15
      scripts/wrappers/mistborn_docker.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

2
modules/mistborn-cli

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit 00986bcb7f945c611d13099672b4fb1e2d0721f2
Subproject commit 73e0c37abdd8b4ce110dddce4643ea36d89c1092

6
scripts/subinstallers/extra/bitwarden.sh

@ -3,4 +3,8 @@ @@ -3,4 +3,8 @@
# generate bitwarden .env files
BITWARDEN_PROD_FILE="$1"
echo "WEBSOCKET_ENABLED=true" > $BITWARDEN_PROD_FILE
echo "SIGNUPS_ALLOWED=true" >> $BITWARDEN_PROD_FILE
echo "SIGNUPS_ALLOWED=true" >> $BITWARDEN_PROD_FILE
echo "MISTBORN_SERVICE_DOMAIN=bitwarden.mistborn" >> $BITWARDEN_PROD_FILE
echo "MISTBORN_SERVICE_NAME=bitwarden" >> $BITWARDEN_PROD_FILE
echo "MISTBORN_SERVICE_PORT=80" >> $BITWARDEN_PROD_FILE

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

15
scripts/wrappers/mistborn_docker.sh

@ -24,6 +24,21 @@ else @@ -24,6 +24,21 @@ else
fi
set +a
# call traefik-extra
if [[ ! -z "${MISTBORN_SERVICE_NAME}" ]] && \
[[ ! -z "${MISTBORN_SERVICE_DOMAIN}" ]] && \
[[ ! -z "${MISTBORN_SERVICE_PORT}" ]]; then
echo "Populating traefik routes"
mistborn-cli traefik-extra \
--domain-name ${MISTBORN_SERVICE_DOMAIN} \
--service-name ${MISTBORN_SERVICE_NAME} \
--web-port ${MISTBORN_SERVICE_PORT}
else
echo "Not populating traefik routes"
fi
# init script
if [[ -f "${MISTBORN_SERVICE_INIT}" ]]; then
echo "Running init script"

Loading…
Cancel
Save