Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions .examples/podman/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Run LibreBooking with Podman

## Using the command line (test)
## Using the command line

This setup is meant for accessing the application for test purposes.
It features:
This example features:

* A librebooking container reachable at <http://localhost:8080>
* A persistent storage for the database and librebooking configuration files
* A cron container executing scheduled librebooking-related jobs
* A database container hosting the librebooking data
* Persistent volumes storage for the database, librebooking configuration,
uploaded images and reservations

Adapt files `db.env`and `lb.env` to your needs

Expand All @@ -20,20 +22,32 @@ Add the containers to the pod

```sh
podman container create \
--name db \
--name librebooking-db \
--replace \
--pod librebooking \
--volume librebooking-db_conf:/config:U \
--env-file db.env \
docker.io/linuxserver/mariadb:10.6.13

podman container create \
--name app \
--name librebooking-app \
--replace \
--pod librebooking \
--volume librebooking-app_conf:/config:U \
--volume librebooking-app_img:/var/www/html/Web/uploads/images:U \
--volume librebooking-app_res:/var/www/html/Web/uploads/reservation:U \
--env-file lb.env \
docker.io/librebooking/librebooking:develop

podman container create \
--name librebooking-cron \
--replace \
--pod librebooking \
--volumes-from librebooking-app \
--volume ./crontab:/config/lb-jobs-cron:U \
--env-file lb.env \
docker.io/librebooking/librebooking:develop \
supercronic /config/lb-jobs-cron
```

Start the application
Expand All @@ -48,15 +62,15 @@ Stop the application
podman pod stop librebooking
```

## Using a Kubernetes yaml file (test)

This setup is meant for accessing the application for test purposes.
It features:
## Using a pod file

* A librebooking container reachable at <http://localhost:8080>
* A persistent storage for the database and librebooking configuration files
This setup is equivalent to the previous one, except it uses the
`podman kube play` command.

Adapt file `librebooking.yml` to your needs
From the previous example, generate the pod file
```sh
podman kube generate librebooking --filename librebooking.yml
```

Start the application

Expand Down
10 changes: 10 additions & 0 deletions .examples/podman/crontab
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Every minute
* * * * * php -f /var/www/html/Jobs/autorelease.php
* * * * * php -f /var/www/html/Jobs/sendmissedcheckin.php
* * * * * php -f /var/www/html/Jobs/sendreminders.php
* * * * * php -f /var/www/html/Jobs/sendwaitlist.php

# Every day at midnight
0 0 * * * php -f /var/www/html/Jobs/sendseriesend.php
0 0 * * * php -f /var/www/html/Jobs/sessioncleanup.php
0 0 * * * php -f /var/www/html/Jobs/deleteolddata.php
2 changes: 1 addition & 1 deletion .examples/podman/lb.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ LB_INSTALL_PASSWORD=app_install_pwd
LB_DATABASE_PASSWORD=db_user_pwd
LB_DATABASE_NAME=librebooking
LB_DATABASE_USER=lb_user
LB_DATABASE_HOSTSPEC=db
LB_DATABASE_HOSTSPEC=librebooking-db
LB_LOGGING_FOLDER=/var/log/librebooking
LB_LOGGING_LEVEL=DEBUG
LB_LOGGING_SQL=false
Expand Down
63 changes: 0 additions & 63 deletions .examples/podman/librebooking.yml

This file was deleted.