From ed73fa0659713e3b364165d4565f179f27b2adb8 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sun, 31 Mar 2024 14:52:39 -0400 Subject: [PATCH] refactor(bookstack): extract into own pod --- services/bookstack/start.sh | 27 ++++++++++++++++----------- services/bookstack/stop.sh | 5 +---- 2 files changed, 17 insertions(+), 15 deletions(-) mode change 100644 => 100755 services/bookstack/start.sh mode change 100644 => 100755 services/bookstack/stop.sh diff --git a/services/bookstack/start.sh b/services/bookstack/start.sh old mode 100644 new mode 100755 index cca42fd..a70a7d2 --- a/services/bookstack/start.sh +++ b/services/bookstack/start.sh @@ -2,19 +2,24 @@ source constants.sh +podman pod create \ + -p 3010:80 \ + --replace \ + "bookstack" + podman run \ - --detach \ - --pod services \ - --name $DB_CONTAINER_NAME \ - --env-file $ENV_FILE_DIR/bookstack-db.env \ - --mount type=bind,source=$APP_DATA_DIR/bookstack-db,target=/var/lib/mysql \ + -d \ + --pod "bookstack" \ + --name "$DB_CONTAINER_NAME" \ + --env-file "$ENV_FILE_DIR"/bookstack-db.env \ + --mount type=bind,source="$APP_DATA_DIR"/bookstack-db,target=/var/lib/mysql \ mariadb:10.6 \ --port 3307 podman run \ - --detach \ - --pod services \ - --name $APP_CONTAINER_NAME \ - --env-file $ENV_FILE_DIR/bookstack-app.env \ - --mount type=bind,source=$APP_DATA_DIR/bookstack-app,target=/config \ - $APP_IMAGE_NAME:$IMAGE_VERSION + -d \ + --pod "bookstack" \ + --name "$APP_CONTAINER_NAME" \ + --env-file "$ENV_FILE_DIR"/bookstack-app.env \ + --mount type=bind,source="$APP_DATA_DIR"/bookstack-app,target=/config \ + "$APP_IMAGE_NAME:$IMAGE_VERSION" diff --git a/services/bookstack/stop.sh b/services/bookstack/stop.sh old mode 100644 new mode 100755 index ea7d565..3873df9 --- a/services/bookstack/stop.sh +++ b/services/bookstack/stop.sh @@ -1,6 +1,3 @@ #!/bin/bash -source constants.sh - -podman rm -f $APP_CONTAINER_NAME -podman rm -f $DB_CONTAINER_NAME +podman pod stop "bookstack"