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
10 changes: 10 additions & 0 deletions RUN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bind_dir_path>
sudo chown go+rwx <bind_dir_path>
```

## Backround jobs

Several services in librebooking such as reminder emails require a job
Expand Down
10 changes: 6 additions & 4 deletions bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@ 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
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 \
Expand Down
24 changes: 11 additions & 13 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sed \
-e 's/Listen 443/Listen 8443/'
sed \
-i /etc/apache2/sites-available/000-default.conf \
-e 's/<VirtualHost *:80>/<VirtualHost *:8080>/'
-e 's/<VirtualHost \*:80>/<VirtualHost \*:8080>/'

if [ -f /var/www/html/composer.json ]; then
sed \
Expand All @@ -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