Compare commits
4
Commits
master
...
155-refactor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1523b914a | ||
|
|
195d4923d7 | ||
|
|
4b268de68c | ||
|
|
a57c529c73 |
+8
-8
@@ -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
|
||||||
|
|||||||
+1
-1
Submodule modules/mistborn-cli updated: 00986bcb7f...73e0c37abd
@@ -3,4 +3,8 @@
|
|||||||
# generate bitwarden .env files
|
# generate bitwarden .env files
|
||||||
BITWARDEN_PROD_FILE="$1"
|
BITWARDEN_PROD_FILE="$1"
|
||||||
echo "WEBSOCKET_ENABLED=true" > $BITWARDEN_PROD_FILE
|
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
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -24,6 +24,21 @@ else
|
|||||||
fi
|
fi
|
||||||
set +a
|
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
|
# init script
|
||||||
if [[ -f "${MISTBORN_SERVICE_INIT}" ]]; then
|
if [[ -f "${MISTBORN_SERVICE_INIT}" ]]; then
|
||||||
echo "Running init script"
|
echo "Running init script"
|
||||||
|
|||||||
Reference in New Issue
Block a user