feat: migrate to service def

This commit is contained in:
Marc 2024-09-28 12:08:04 -04:00
parent 2aec7a1170
commit 97d75e8d7d
Signed by: marc
GPG key ID: 048E042F22B5DC79
7 changed files with 23 additions and 34 deletions

View file

@ -1,5 +1 @@
# Bookstack
## Configuration
The application does not expect any environment files, an empty one should be supplied.

View file

@ -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 .

23
service.yml Normal file
View file

@ -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

View file

@ -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"

View file

@ -1,3 +0,0 @@
#!/bin/bash
podman pod stop "bookstack"