feat(bitwarden): move Bitwarden setup to task model

fix: newline escape
This commit is contained in:
Marc 2023-12-15 15:17:36 -05:00
parent 92d8d3672d
commit ca496b0b49
Signed by: marc
GPG key ID: 048E042F22B5DC79
6 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,6 @@
#!/bin/bash
source constants.sh
docker build -t $DB_IMAGE_NAME:dev -f Dockerfile-bitwarden-db .
docker build -t $APP_IMAGE_NAME:dev -f Dockerfile-bitwarden-app .

View file

@ -0,0 +1,8 @@
#!/bin/bash
export APP_NAME="bitwarden"
export APP_CONTAINER_NAME=$APP_NAME-app
export APP_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$APP_CONTAINER_NAME
export DB_CONTAINER_NAME=$APP_NAME-db
export DB_IMAGE_NAME=$CONTAINER_NAME_PREFIX-$DB_CONTAINER_NAME
export NETWORK_NAME=$APP_NAME-local

View file

@ -0,0 +1,23 @@
#!/bin/bash
source constants.sh
docker network create $NETWORK_NAME || echo "Network $NETWORK_NAME already exists"
docker run \
--detach \
--network $NETWORK_NAME \
--name $DB_CONTAINER_NAME \
--env-file $ENV_FILE_DIR/bitwarden-db.env \
--mount type=bind,source=$APP_DATA_DIR/bitwarden/db,target=/var/lib/mysql \
$DB_IMAGE_NAME:dev
docker run \
--detach \
--network $NETWORK_NAME \
--name $APP_CONTAINER_NAME \
--env-file $ENV_FILE_DIR/bitwarden-web.env \
--publish 8080:8080 \
--mount type=bind,source=$APP_DATA_DIR/bitwarden/config,target=/etc/bitwarden \
--mount type=bind,source=$APP_DATA_DIR/bitwarden/logs,target=/var/log/bitwarden \
$APP_IMAGE_NAME:dev

View file

@ -0,0 +1,6 @@
#!/bin/bash
source constants.sh
docker rm -f $APP_CONTAINER_NAME
docker rm -f $DB_CONTAINER_NAME