From 97d75e8d7df7f43e16f7a059efcea0dc9fc15397 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 28 Sep 2024 12:08:04 -0400 Subject: [PATCH] feat: migrate to service def --- README.md | 4 ---- ...file-bookstack-app => bookstack.Dockerfile | 0 build.sh | 4 ---- Dockerfile-bookstack-db => db.Dockerfile | 0 service.yml | 23 +++++++++++++++++++ start.sh | 23 ------------------- stop.sh | 3 --- 7 files changed, 23 insertions(+), 34 deletions(-) rename Dockerfile-bookstack-app => bookstack.Dockerfile (100%) delete mode 100644 build.sh rename Dockerfile-bookstack-db => db.Dockerfile (100%) create mode 100644 service.yml delete mode 100755 start.sh delete mode 100755 stop.sh diff --git a/README.md b/README.md index 690b12a..8980070 100644 --- a/README.md +++ b/README.md @@ -1,5 +1 @@ # Bookstack - -## Configuration - -The application does not expect any environment files, an empty one should be supplied. diff --git a/Dockerfile-bookstack-app b/bookstack.Dockerfile similarity index 100% rename from Dockerfile-bookstack-app rename to bookstack.Dockerfile diff --git a/build.sh b/build.sh deleted file mode 100644 index e556a30..0000000 --- a/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -podman build -t "spad-bookstack-db:$IMAGE_VERSION" -f Dockerfile-bookstack-db . -podman build -t "spad-bookstack-app:$IMAGE_VERSION" -f Dockerfile-bookstack-app . diff --git a/Dockerfile-bookstack-db b/db.Dockerfile similarity index 100% rename from Dockerfile-bookstack-db rename to db.Dockerfile diff --git a/service.yml b/service.yml new file mode 100644 index 0000000..f0261af --- /dev/null +++ b/service.yml @@ -0,0 +1,23 @@ +name: bookstack +ports: + - host: 3010 + container: 80 +containers: + - name: app + env-file: /mnt/hintonburggrad/envs/bookstack-app.env + image: bookstack-app:latest + volumes: + - host: /mnt/hintonburggrad/apps/bookstack-app + container: /config + - name: db + env-file: /mnt/hintonburggrad/envs/bookstack-db.env + image: bookstack-db:latest + volumes: + - host: /mnt/hintonburggrad/apps/bookstack-db + container: /var/lib/mysql +build: + images: + - path: ./bookstack.Dockerfile + tag: bookstack-app + - path: ./db.Dockerfile + tag: bookstack-db diff --git a/start.sh b/start.sh deleted file mode 100755 index f0de274..0000000 --- a/start.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -podman pod create \ - -p 3010:80 \ - --replace \ - "bookstack" - -podman run \ - -d \ - --pod "bookstack" \ - --name "bookstack_db" \ - --env-file "$ENV_FILE_DIR"/bookstack-db.env \ - --mount type=bind,source="$APP_DATA_DIR"/bookstack-db,target=/var/lib/mysql \ - "spad-bookstack-db:$IMAGE_VERSION" \ - --port 3307 - -podman run \ - -d \ - --pod "bookstack" \ - --name "bookstack_app" \ - --env-file "$ENV_FILE_DIR"/bookstack-app.env \ - --mount type=bind,source="$APP_DATA_DIR"/bookstack-app,target=/config \ - "spad-bookstack-app:$IMAGE_VERSION" diff --git a/stop.sh b/stop.sh deleted file mode 100755 index 3873df9..0000000 --- a/stop.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -podman pod stop "bookstack"