From 04eb087c89588ca9fefd91c321421b6b89e982e1 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Wed, 6 May 2026 12:10:44 +0200 Subject: [PATCH 1/7] Rename containers to be consistent with the docker examples --- .examples/podman/README.md | 4 ++-- .examples/podman/lb.env | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.examples/podman/README.md b/.examples/podman/README.md index 155ae52..aa1eeda 100644 --- a/.examples/podman/README.md +++ b/.examples/podman/README.md @@ -20,7 +20,7 @@ Add the containers to the pod ```sh podman container create \ - --name db \ + --name librebooking-db \ --replace \ --pod librebooking \ --volume librebooking-db_conf:/config:U \ @@ -28,7 +28,7 @@ podman container create \ docker.io/linuxserver/mariadb:10.6.13 podman container create \ - --name app \ + --name librebooking-app \ --replace \ --pod librebooking \ --volume librebooking-app_conf:/config:U \ diff --git a/.examples/podman/lb.env b/.examples/podman/lb.env index 72bb6a6..47cef0f 100644 --- a/.examples/podman/lb.env +++ b/.examples/podman/lb.env @@ -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 From 8027bfbed636401b116652fa564347cbeb4134d9 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Wed, 6 May 2026 16:01:15 +0200 Subject: [PATCH 2/7] Change podman README.md to add volumes for uploaded images and reservations --- .examples/podman/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.examples/podman/README.md b/.examples/podman/README.md index aa1eeda..a92ecaa 100644 --- a/.examples/podman/README.md +++ b/.examples/podman/README.md @@ -32,6 +32,8 @@ podman container create \ --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 ``` From bd69476ca03a080c3927593f6187533da48f91e9 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Thu, 7 May 2026 13:27:32 +0200 Subject: [PATCH 3/7] Add cron container to the podman cli example --- .examples/podman/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.examples/podman/README.md b/.examples/podman/README.md index a92ecaa..7725329 100644 --- a/.examples/podman/README.md +++ b/.examples/podman/README.md @@ -36,6 +36,16 @@ podman container create \ --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 From 6b36b66810e1718428b62f310e9e18689ac4f150 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Thu, 7 May 2026 14:00:36 +0200 Subject: [PATCH 4/7] Rewrite the pod section in file .examples/podman/README.md --- .examples/podman/README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.examples/podman/README.md b/.examples/podman/README.md index 7725329..7532491 100644 --- a/.examples/podman/README.md +++ b/.examples/podman/README.md @@ -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 -* 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 @@ -60,15 +62,17 @@ Stop the application podman pod stop librebooking ``` -## Using a Kubernetes yaml file (test) +## Using a pod file -This setup is meant for accessing the application for test purposes. -It features: +This setup is equivalent to the previous one, except it uses the +`podman kube play` command. -* A librebooking container reachable at -* A persistent storage for the database and librebooking configuration files +Adapt the above cli example to your needs and start the pod -Adapt file `librebooking.yml` to your needs +Generate the pod file +```sh +podman kube generate librebooking --filename librebooking.yml +``` Start the application From 1166525797a003ee02c8700ab32c44f1c2acdd37 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Thu, 7 May 2026 14:45:35 +0200 Subject: [PATCH 5/7] Add file crontab to .examples/podman for examples to work --- .examples/podman/crontab | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .examples/podman/crontab diff --git a/.examples/podman/crontab b/.examples/podman/crontab new file mode 100644 index 0000000..2ba4c66 --- /dev/null +++ b/.examples/podman/crontab @@ -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 From 48d6c0070f96a02c5ac138bc7b71babb188c7801 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sun, 24 May 2026 12:30:28 +0200 Subject: [PATCH 6/7] Remove .examples/podman/librebooking.yml for it can be created with podman kube generate --- .examples/podman/librebooking.yml | 63 ------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 .examples/podman/librebooking.yml diff --git a/.examples/podman/librebooking.yml b/.examples/podman/librebooking.yml deleted file mode 100644 index 5cc0f7e..0000000 --- a/.examples/podman/librebooking.yml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - labels: - app: librebooking - name: librebooking -spec: - containers: - - name: db - image: docker.io/linuxserver/mariadb:10.6.13 - volumeMounts: - - mountPath: /config - name: librebooking-db-conf-pvc - env: - - name: TZ - value: Europe/Helsinki - - name: PGID - value: "1000" - - name: MYSQL_ROOT_PASSWORD - value: db_root_pwd - - name: PUID - value: "1000" - - name: app - image: docker.io/librebooking/librebooking:develop - args: - - apache2-foreground - ports: - - containerPort: 8080 - hostPort: 8080 - securityContext: {} - volumeMounts: - - mountPath: /config - name: librebooking-app-conf-pvc - env: - - name: LB_LOGGING_FOLDER - value: /var/log/librebooking - - name: LB_DATABASE_PASSWORD - value: db_user_pwd - - name: LB_UPLOADS_IMAGE_UPLOAD_URL - value: Web/uploads/images - - name: LB_DATABASE_USER - value: lb_user - - name: LB_LOGGING_SQL - value: "false" - - name: LB_DATABASE_NAME - value: librebooking - - name: LB_UPLOADS_RESERVATION_ATTACHMENT_PATH - value: Web/uploads/reservation - - name: LB_DATABASE_HOSTSPEC - value: db - - name: LB_DEFAULT_TIMEZONE - value: Europe/Helsinki - - name: LB_LOGGING_LEVEL - value: DEBUG - - name: LB_INSTALL_PASSWORD - value: app_install_pwd - volumes: - - name: librebooking-db-conf-pvc - persistentVolumeClaim: - claimName: librebooking-db-conf - - name: librebooking-app-conf-pvc - persistentVolumeClaim: - claimName: librebooking-app-conf From d365a68453ef2eebcb8923d65f2a7c1379611b19 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sun, 24 May 2026 12:31:06 +0200 Subject: [PATCH 7/7] Command podman kube generate does not need the pod to be previously started --- .examples/podman/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.examples/podman/README.md b/.examples/podman/README.md index 7532491..d81fe3a 100644 --- a/.examples/podman/README.md +++ b/.examples/podman/README.md @@ -67,9 +67,7 @@ podman pod stop librebooking This setup is equivalent to the previous one, except it uses the `podman kube play` command. -Adapt the above cli example to your needs and start the pod - -Generate the pod file +From the previous example, generate the pod file ```sh podman kube generate librebooking --filename librebooking.yml ```