librebooking / docker Goto Github PK
View Code? Open in Web Editor NEWLibrebooking as a docker container
License: GNU General Public License v3.0
Librebooking as a docker container
License: GNU General Public License v3.0
I am trying to install an instance of librebooking, but when i try this (copy & paste):
docker-compose: simple setup with docker secrets
As an alternative to passing sensitive information via environment variables, _FILE may be appended to some of the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. The following setup is also meant to be run behind an existing reverse proxy.
Create a docker-compose.yml file from the following sample and adapt it to your needs and standards:
version: "3.7"
services:
db:
image: linuxserver/mariadb
container_name: librebooking-db
restart: always
networks:
- net
volumes:
- vol-db:/config
environment:
- PUID=1000
- PGID=1000
- TZ=
- MYSQL_DATABASE=librebooking
- FILE__MYSQL_ROOT_PASSWORD=/run/secrets/db_root_pwd
- MYSQL_USER=lb_user
- FILE__MYSQL_PASSWORD=/run/secrets/db_user_pwd
secrets:
- db_root_pwd
- db_user_pwd
app:
image: colisee/librebooking
container_name: librebooking
restart: always
depends_on:
- db
networks:
- net
ports:
- "8080:80"
volumes:
- vol-app:/var/www/html
environment:
- TZ=
- LB_DB_HOST=lb-db
- LB_DB_NAME=librebooking
- LB_INSTALL_PWD_FILE=/run/secrets/lb_install_pwd
- LB_DB_USER=lb_user
- LB_DB_USER_PWD_FILE=/run/secrets/lb_user_pwd
secrets:
- lb_install_pwd
- lb_user_pwd
volumes:
vol-db:
name: librebooking-db_data
vol-app:
name: librebooking_html
networks:
net:
name: librebooking
secrets:
db_root_pwd:
file: ./db_root_pwd.txt # put the MariaDB root password in this file
db_user_pwd:
file: ./db_user_pwd.txt # put the MariaDB user password in this file
lb_user_pwd:
file: ./db_user_pwd.txt
lb_install_pwd:
file: ./lb_install_pwd.txt # put the app installation password in this file
Then run the following commands:
echo 'your_Mariadb_root_password' > db_root_pwd.txt;
echo 'your_Mariadb_user_password' > db_user_pwd.txt;
echo 'your_Librebooking_installation_password' > lb_install_pwd.txt;
docker-compose up --detach
i got this:
What is wrong?
I've been debuging but i can't make it works.
Update content of file BUILD.md to reflect the changes brought with commit #24
timezonedb
should be installed inside the container imageJust a Request For Enhancement (RFE).
Would be nice if there was some easy way to build a locally modified version of LibreBooking into a container image.
My use case is that I am trying to debug some issues with the API, and would like to be able to make modifications and then regenerate the image.
My current technique is to make a new Dockerfile
using this project's image (FROM librebooking/librebooking:develop
) and then copy the modified files into the image and publish it locally. Maybe there is a better way to do this.
Thanks for making this project as it has been a big help for me! 👍
docker-compose up -d
docker stop librebooking
docker start librebooking
Result: pecl/timezonedb is already installed and is the same as the released version 2023.3
Hello,
I am trying to use LibreBooking docker, and i got the classic issue "Unknow error". Which PHP's version did you use inside your docker ?
Thanks.
Benoit (Newbie)
Let's say an resource image is uploaded. Should the upload folder not be persistent? I mean shouldn't be bound to a host folder by a volume?
The old url https://github.com/LibreBooking/app/archive/${APP_GH_REF}.tar.gz
doesn't seem to work any longer.
Switch to the official REST API url https://api.github.com/repos/OWNER/REPO/tarball/REF
Librebooking was running ok for few weeks and then suddenly started failing continuously. The last logs from the librebooking container are as follows:
Buenas tardes, estoy teniendo problemas con el envió de mails, por ejemplo al momento de recuperar la password.
no se si me faltara instalar algún paquete en el servidor o modificar alguna configuracion. Muchas gracias!!!
Give the user the possibility to specify the file used to initialize config.php
, through the new environment variable LB_ENV
.
LB_ENV | File used to initialize config.php |
---|---|
production | /var/www/html/config/config.dist.php |
dev | /var/www/html/config/config.devel.php |
LB_ENV default value is production
The documentation regarding the migration to version-2 is not correct
Only 1 parameter is needed: the application branch (develop
) or the application version
I wanted to test the upgrade process, so I did a fresh install of v2.8.5, checked the time zone and it was fine, added a resource, user and reservation to test that they persisted when upgrading.
the update process ran without issue,
but when reviewing the server settings I saw that the time had changed to UTC +00:00, when before updating it was fine (America/Mexico_City).
I guess it must be the same as the previous time, the php.ini, because in the application configuration the time zone is set to America/Mexico_City
I hope you can make the correction soon,
while I work with 2.8.5
Greetings.
Currently the full application (code+data) folders are suggested to be mounted externally using the reference docker-compose.yml file. The app currently only has user data in config/ (some plugins config folders), uploads/, Web/uploads and Web/images. This could also be improved in the librebooking source project by unifying these folders into a single /data folder.
The deployment and maintenance could be simplified if only data volumes need to be mounted externally instead of the full /var/www/html folder, the copy of the full code could be avoided that will also simplify upgrades. The Dockerfile could include the compose install dependencies and application code internally. A good reference for this aproach is the one in the project snipeit https://github.com/snipe/snipe-it/blob/master/Dockerfile
What do you think?
Cheers!,
Identify changes needed to dockerize librebooking 2.8.6
I've changed the TZ value in docker-compose.yml and the timezone is not reflected in librebooking.
Compose file:
After run docker compose, Application Configuration show America/New_York.
Then i change it to America/Mexico_City, but when i go to Server Settings it shows this:
That is not the real time.
How can i change it to America/Mexico_City?
Thanks in advance.
Hello @colisee,
Sorry, I have a new question.
Maybe not a problem, probably misunderstanding.
Did you install the sendmail package in docker image ? Because I have this error in librebooking docker log.
sh:1: /usr/sbin/sendmail: not found
sh:1: /usr/sbin/sendmail: not found
and the mails do not work... I also have a doubt about the smtp.secure parameter between tls and starttls . But the logs rather indicate that the package is not present in the docker.
Thanks
Hello,
I'm using the following docker's image : librebooking/librebooking:2.8.6-2.1.1
When I try to upload an image file, I get the following error :
gd extension is required for image upload
How can I fix that issue ? Thanks
In
Line 26 in d011ffa
It uses the variable PHP_INI_DIR
. I couldn't find that variable defined and was wondering how it is being set.
Thanks!
The Dockerfile should use the appropriate php:x-apache base image, instead of the fixed php:7-apache
librebooking version | php version |
---|---|
< 2.8.6 | php:7-apache |
2.8.6 | php:8-apache |
Hi @colisee
Well, I have a very limited knowledge about coding, so I'll only be able to bug report. And here I am again.
I have an issue with resource groups, i can create, rename and use them. But i cannot delete them.
Here is the error from the logs when i try to remove one (right click > delete, on the name) :
2023-11-28T10:01:57.333945724Z 172.19.0.1 - - [28/Nov/2023:11:01:57 +0100] "GET /Web/scripts/js/jquery.contextMenu.js?v=2.8.6.1 HTTP/1.1" 200 13317 "https://URL/Web/admin/manage_resource_groups.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
2023-11-28T10:02:02.901820855Z [Tue Nov 28 11:02:02.901590 2023] [php:notice] [pid 81] [client 172.19.0.1:50608] Error: ValueError: The arguments array must contain 2 items, 1 given in /var/www/html/lib/Common/Logging/Log.php:77\nStack trace:\n#0 /var/www/html/lib/Common/Logging/Log.php(77): vsprintf()\n#1 /var/www/html/Presenters/Admin/ManageResourceGroupsPresenter.php(123): Log::Debug()\n#2 /var/www/html/Presenters/ActionPresenter.php(68): ManageResourceGroupsPresenter->DeleteGroup()\n#3 /var/www/html/Pages/Admin/ManageResourceGroupsPage.php(90): ActionPresenter->ProcessAction()\n#4 /var/www/html/Pages/ActionPage.php(27): ManageResourceGroupsPage->ProcessAction()\n#5 /var/www/html/Pages/SecurePage.php(54): ActionPage->PageLoad()\n#6 /var/www/html/Web/admin/manage_resource_groups.php(9): SecureActionPageDecorator->PageLoad()\n#7 {main}, referer: https://URL/Web/admin/manage_resource_groups.php
2023-11-28T10:02:02.901880179Z [Tue Nov 28 11:02:02.901623 2023] [php:notice] [pid 81] [client 172.19.0.1:50608] #0 /var/www/html/lib/Common/Logging/ExceptionHandler.php(22): WebExceptionHandler->HandleException(Object(ValueError))\n#1 [internal function]: ExceptionHandler::Handle(Object(ValueError))\n, referer: https://URL/Web/admin/manage_resource_groups.php
2023-11-28T10:02:02.918305404Z 172.19.0.1 - - [28/Nov/2023:11:02:02 +0100] "POST /Web/admin/manage_resource_groups.php?action=DeleteGroup&nid=1 HTTP/1.1" 200 2955 "https://URL/Web/admin/manage_resource_groups.php" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
Let me know if you have an idea :)
Have a good day!
Hey again!
I could configure most of LibreBooking to work the way i want with the security i want etc. The only issue I am left with before putting it to production would be to make the sync.groups of the LDAP Auth to work.
I have the same group names on my LDAP (FreeIPA) and LibreBooking, and people are connecting trough their LDAP accounts, but it won't sync any of the groups.
I tried to add memberof=Groups in attribute.mapping, but didn't changed anything. Is there something i could have forget ?
I'm not sure if anyone here can be of help, or if I should better go on the Librebooking/app board, but thanks in advance anyway!
Hi, guys.
I need to mount /var/www/html container to my host folder, is there a way to do that ?
I appreciate you help.
Thanks.
Hi, before that nothing i am almost a noob in docker topic xD
I have a reverse proxy (traefik container) that get ssl certificates from internal CA (step ca).
Then, what i do to makes something works in that scenario, i just add traefik's labels to a docker compose file in the next way:
labels:
- traefik.enable=true
- traefik.http.services.libre.loadbalancer.server.port=80
- traefik.http.routers.libre.entrypoints=web
- traefik.http.routers.libre.rule=Host(`${FQDN}`)
- traefik.http.middlewares.libre-https-redirect.redirectscheme.scheme=https
- traefik.http.routers.libre.middlewares=wordpress-https-redirect
- traefik.http.routers.libre-secure.entrypoints=websecure
- traefik.http.routers.libre-secure.rule=Host(`${FQDN}`)
- traefik.http.routers.libre-secure.tls=true
- traefik.http.routers.libre-secure.tls.certresolver=myresolver
where $FQDN is the internal domain name.
Also i attach the container to an external docker network called traefik-net, to connect the container to the traefik network.
I've tried to make the same with librebooking container but i can't make it work.
Have you some idea what i need to do to make it work?
Thanks in advance:
PD: Sorry for my bad english
Hello,
Thanks for this great project.
I'm getting the following error:
The docker-compose yml I'm using is as follows:
version: "3.7"
services:
db:
image: linuxserver/mariadb
container_name: librebooking-db
restart: always
networks:
- net
volumes:
- vol-db:/config
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto
- MYSQL_DATABASE=librebooking
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=lb_user
- MYSQL_PASSWORD=lb_user
app:
image: librebooking/librebooking
container_name: librebooking
restart: always
depends_on:
- db
networks:
- net
ports:
- "8080:80"
volumes:
- vol-app:/var/www/html
environment:
- TZ=America/Toronto
- LB_DB_HOST=db
- LB_DB_NAME=librebooking
- LB_INSTALL_PWD=install
- LB_DB_USER=lb_user
- LB_DB_USER_PWD=lb_user
volumes:
vol-db:
name: librebooking-db_data
vol-app:
name: librebooking_html
networks:
net:
name: librebooking
Example:
Hi,
Running docker build 2.8.6-2.1.0 (https://hub.docker.com/layers/librebooking/librebooking/2.8.6-2.1.0/images/sha256-32b6cbd1641d6e78b80ca8f259b3051edb5e744f0f83a8b88db4f2d879bdfb73?context=explore), I'm trying to use the REST API to manage librebooking, but my requests are getting an "HTTP 500 Internal Server Error" reply.
Logs show "/var/www/html/Web/Services/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration"
docker start xxx
fails when linking file /config/config.php
If the container is stopped, then it must be removed and created again, as in:
docker stop --force xxx && docker run xxx
The linking of file /config/config.php must take place only if file /var/www/html/config/config.php
does not exist
when i try to get the image:
sudo docker image pull librebooking/librebooking:2.8.6
I got:
Error response from daemon: manifest for librebooking/librebooking:2.8.6 not found: manifest unknown: manifest unknown
Obviously i can't make works docker compose file with:
app:
image: librebooking/librebooking:2.8.6-2.3.2
container_name: reservas
restart: always
depends_on:
- db
networks:
- reservas-net
ports:
- "8082:80"
volumes:
- vol-app:/config
Am i doing something wrong?
Thanks in advance.
Github action docker-publish can be called manually or from another workflow.
REGISTRY_TOKEN
from the calling workflow and thus cannot log to the docker hubHey,
I'm quite new in self hosting processes and I'm having an issue i don't really get. I try to pull the librebooking image with the docker-compose made for dev environment. But whatever version of librebooking i try, it says :
I thought it was the version that wasn't existent but even while putting the ones indicated here, or on the dockerhub page i get this error.
Do you have an idea of what i could be doing wrong ? (Tried : latest, 2.8.6-2.0, develop-2.2.0, 2.8.6-2.2.0)
Thanks a lot!
Here is the docker-compose :
version: "3.7"
services:
db:
image: linuxserver/mariadb:10.6.13
container_name: librebooking-db
restart: always
networks:
- net
volumes:
- vol-db:/config
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Madrid
- MYSQL_DATABASE=librebooking
- MYSQL_ROOT_PASSWORD=****
- MYSQL_USER=sysadmin
- MYSQL_PASSWORD=****
app:
image: librebooking/librebooking
container_name: librebooking
restart: always
depends_on:
- db
networks:
- net
ports:
- "8069:80"
volumes:
- vol-app:/config
environment:
- TZ=Europe/Madrid
- LB_DB_HOST=db
- LB_DB_NAME=librebooking
- LB_INSTALL_PWD=****
- LB_DB_USER=sysadmin
- LB_DB_USER_PWD=****
- LB_ENV=dev
volumes:
vol-db:
name: librebooking_data
vol-app:
name: librebooking_conf
networks:
net:
name: librebooking
I am following the instructions here: https://github.com/LibreBooking/docker/blob/develop/SETUP.md
When I try to do the "Database initialization" I always receive error messages like:
Error connecting to mysql database. Check your configured host and entered username and password.
I am using the username "root" and have tried both the values of MYSQL_ROOT_PASSWORD
and MYSQL_PASSWORD
. LB_DB_USER_PWD
is set to the same value as MYSQL_PASSWORD
.
I have tried: image: librebooking/librebooking:2.8.6.1
and image: librebooking/librebooking:develop
I'm hoping I'm doing some simple error but have been trying for over an hour without any success.
Dockerfile
from docker-php-ext-install to install-php-extensionsHello,
When the container is restarted, it throws an error and stops :
/config /var/www/html
/var/www/html
+ '[' -f /config/config.php ']'
+ '[' -f /var/www/html/config/config.php ']'
++ find /var/www/html/plugins -type f -name '*dist*'
+ for source in $(find /var/www/html/plugins -type f -name "*dist*")
++ echo /var/www/html/plugins/Authentication/Moodle/Moodle.config.dist.php
++ sed -e s/.dist//
+ target=/var/www/html/plugins/Authentication/Moodle/Moodle.config.php
++ basename /var/www/html/plugins/Authentication/Moodle/Moodle.config.php
+ cp --no-clobber /var/www/html/plugins/Authentication/Moodle/Moodle.config.dist.php /config/Moodle.config.php
++ basename /var/www/html/plugins/Authentication/Moodle/Moodle.config.php
+ chown www-data:www-data /config/Moodle.config.php
++ basename /var/www/html/plugins/Authentication/Moodle/Moodle.config.php
+ ln -s /config/Moodle.config.php /var/www/html/plugins/Authentication/Moodle/Moodle.config.php
ln: failed to create symbolic link '/var/www/html/plugins/Authentication/Moodle/Moodle.config.php': File exists
Tested on versions: 2.8.5.5, 2.8.6 and develop
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.