feat: migrate to service def
This commit is contained in:
parent
2aec7a1170
commit
97d75e8d7d
7 changed files with 23 additions and 34 deletions
|
@ -1,5 +1 @@
|
|||
# Bookstack
|
||||
|
||||
## Configuration
|
||||
|
||||
The application does not expect any environment files, an empty one should be supplied.
|
||||
|
|
4
build.sh
4
build.sh
|
@ -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
23
service.yml
Normal 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
|
23
start.sh
23
start.sh
|
@ -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"
|
3
stop.sh
3
stop.sh
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
podman pod stop "bookstack"
|
Reference in a new issue