From d64b40dc4bd6567f9edaaa05418860e5620fe8f6 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sat, 21 Mar 2026 17:11:01 +0100 Subject: [PATCH 1/5] Create a link to /var/www/html only when /var/www/${APP_PATH} does not exist --- bin/entrypoint.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index e63f2e9..c770353 100644 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -112,9 +112,11 @@ if [ -n "${APP_PATH}" ]; then -e "s:/var/www/html:/var/www:" ## Create a link to the html directory - pushd /var/www - ln -s html "${APP_PATH}" - popd + if ! [ -e "/var/www/${APP_PATH}" ]; then + pushd /var/www + ln -s html "${APP_PATH}" + popd + fi ## Adapt the .htaccess file sed \ From 82cc7a71af74e69e9527460745457e597daa3395 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sat, 21 Mar 2026 17:19:03 +0100 Subject: [PATCH 2/5] Fix permissions when taking into account the usage of env APP_PATH --- setup.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/setup.sh b/setup.sh index 8462b8b..1968c8b 100644 --- a/setup.sh +++ b/setup.sh @@ -65,17 +65,15 @@ if ! [ -d /var/www/html/tpl_c ]; then fi mkdir /var/www/html/Web/uploads/reservation -chown --recursive www-data:root \ - /var/www/html/config \ - /var/www/html/plugins \ - /var/www/html/tpl_c \ - /var/www/html/Web/uploads/images \ - /var/www/html/Web/uploads/reservation \ +chown www-data:root \ + /var/www \ /usr/local/etc/php/conf.d/librebooking.ini -chmod --recursive g+rwx \ - /var/www/html/config \ - /var/www/html/plugins \ - /var/www/html/tpl_c \ - /var/www/html/Web/uploads/images \ - /var/www/html/Web/uploads/reservation \ +chmod g+rwx \ + /var/www \ /usr/local/etc/php/conf.d/librebooking.ini +chown --recursive www-data:root \ + /etc/apache2/sites-available \ + /var/www/html/tpl_c +chmod --recursive g+rwx \ + /etc/apache2/sites-available \ + /var/www/html/tpl_c From fddb83d0e6d59ee0a2c0e94461b19f9e31416fcc Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sat, 21 Mar 2026 17:26:12 +0100 Subject: [PATCH 3/5] Adapt virtual server config file inside /etc/apache2/sites-available --- bin/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index c770353..3bdb4d7 100644 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -108,7 +108,7 @@ fi if [ -n "${APP_PATH}" ]; then ## Set server document root 1 directory up sed \ - -i /etc/apache2/sites-enabled/000-default.conf \ + -i /etc/apache2/sites-available/000-default.conf \ -e "s:/var/www/html:/var/www:" ## Create a link to the html directory From 91a3860d07b15f6bc965ffd92aa198e988ab5070 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Sat, 21 Mar 2026 18:00:59 +0100 Subject: [PATCH 4/5] Fix port substitution in /etc/apache2/sites-available/000-default.conf --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 1968c8b..b55b16f 100644 --- a/setup.sh +++ b/setup.sh @@ -47,7 +47,7 @@ sed \ -e 's/Listen 443/Listen 8443/' sed \ -i /etc/apache2/sites-available/000-default.conf \ - -e 's///' + -e 's///' if [ -f /var/www/html/composer.json ]; then sed \ From 71d9f541587ed4b0f1d5ffb67db1b6ab2d1464a2 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Wed, 25 Mar 2026 20:41:20 +0100 Subject: [PATCH 5/5] Add instructions when using bind mounts --- RUN.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/RUN.md b/RUN.md index 51fb124..e0c8430 100644 --- a/RUN.md +++ b/RUN.md @@ -41,6 +41,16 @@ For instance: * favicon: `/var/www/html/Web/favicon.ico` +## Bind mounts + +If you are using bind mounts for librebooking, then you need to grant +the required permissions before running the librebooking container + +```sh +sudo mkdir --parents +sudo chown go+rwx +``` + ## Backround jobs Several services in librebooking such as reminder emails require a job