refactor(bitwarden): extract into own pod
This commit is contained in:
parent
f8038836ea
commit
1770d26bad
2 changed files with 22 additions and 18 deletions
|
@ -2,19 +2,26 @@
|
||||||
|
|
||||||
source constants.sh
|
source constants.sh
|
||||||
|
|
||||||
podman run \
|
podman pod create \
|
||||||
--detach \
|
-p 8080:8080 \
|
||||||
--pod services \
|
--replace \
|
||||||
--name $DB_CONTAINER_NAME \
|
"bitwarden"
|
||||||
--env-file $ENV_FILE_DIR/bitwarden-db.env \
|
|
||||||
--mount type=bind,source=$APP_DATA_DIR/bitwarden/db,target=/var/lib/mysql \
|
|
||||||
$DB_IMAGE_NAME:$IMAGE_VERSION
|
|
||||||
|
|
||||||
podman run \
|
podman run \
|
||||||
--detach \
|
-d \
|
||||||
--pod services \
|
--pod "bitwarden" \
|
||||||
--name $APP_CONTAINER_NAME \
|
--name "$DB_CONTAINER_NAME" \
|
||||||
--env-file $ENV_FILE_DIR/bitwarden-web.env \
|
--env-file "$ENV_FILE_DIR"/bitwarden-db.env \
|
||||||
--mount type=bind,source=$APP_DATA_DIR/bitwarden/config,target=/etc/bitwarden \
|
--mount type=bind,source="$APP_DATA_DIR"/bitwarden/db,target=/var/lib/mysql \
|
||||||
--mount type=bind,source=$APP_DATA_DIR/bitwarden/logs,target=/var/log/bitwarden \
|
--replace \
|
||||||
$APP_IMAGE_NAME:$IMAGE_VERSION
|
"$DB_IMAGE_NAME:$IMAGE_VERSION"
|
||||||
|
|
||||||
|
podman run \
|
||||||
|
-d \
|
||||||
|
--pod "bitwarden" \
|
||||||
|
--name "$APP_CONTAINER_NAME" \
|
||||||
|
--env-file "$ENV_FILE_DIR"/bitwarden-web.env \
|
||||||
|
--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 \
|
||||||
|
--replace \
|
||||||
|
"$APP_IMAGE_NAME:$IMAGE_VERSION"
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source constants.sh
|
podman pod stop "bitwarden"
|
||||||
|
|
||||||
podman rm -f $APP_CONTAINER_NAME
|
|
||||||
podman rm -f $DB_CONTAINER_NAME
|
|
||||||
|
|
Reference in a new issue