Hello, I installed dolibarr on my NAS SYNOLOGY DS923+ with “Project” Container manager…
The creation goes well when I launch my docker compose:
version: '3'
services:
mariadb:
image: mariadb:10.6
container_name: dolibarr_db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASSWORD}
volumes:
- /volume1/docker/dolibarr:/db/var/lib/mysql # Physical path on the NAS
# networks: # Optional: to be deleted if unnecessary
` - dolibarr_net
web:
image: dolibarr/dolibarr:23.0.2 # Specific version (recommended)
container_name: dolibarr_web
restart: always
ports:
- "8088:80"
user: 1029:100 # definition user docker
environment:
- DOLI_DB_HOST=mariadb
- DOLI_DB_USER=${DB_USER}
- DOLI_DB_PASSWORD=${DB_PASSWORD}
- DOLI_DB_NAME=${DB_NAME}
- DOLI_ADMIN_LOGIN=${DOLI_ADMIN_LOGIN}
- DOLI_ADMIN_PASSWORD=${DOLI_ADMIN_PASSWORD}
volumes:
- /volume1/docker/dolibarr:/html/var/www/html
- /volume1/docker/dolibarr:/documents/var/www/documents
depends_on:
- mariadb
# networks: # Optional: to be deleted if unnecessary
` - dolibarr_net
# volumes: # Not necessary if you use physical paths
# networks: # Optional: to be deleted if unnecessary
I have set up volumes with absolute paths to make sure that the installation will arrive in the correct directories I created.
Everything seems fine, except that the directories remain desperately empty, and generated an error 192.168.0.14:8088 returned a blank page: logical since there is nothing.
I trusted my antivirus…
I don’t know where the Dolibarr and Mariadb files are installed.
I’m at rock bottom…
Could you please help me?
Helpppppppppppppppp please… examined out of print.
I took the liberty to format your compose file content properly. Next time please click the “</>” icon from the wyswig-editor menu, so that code/logs are shared as preformated text. Otherwise it can easily become unreadable and people (including me) might lose interest in reading the post at all.
A Container Manager project indeed bases on a compose file content. A project is a deployed instance of all ressources from the compose file content. Synology’s container manager is actually one of the few that use the correct name
It has been a while since I saw the Container Manager. Please remind me again how the Conatiner Manager is able to resolve the variables you have in the compose file content? Does it allow specifiying the env file? If not, this could already be the cause of your problem.
Based on what you shared so far, it’s kind of like Schroedinger’s cat: the containers are alive and dead at the same time. Please share the error messages from container logs, so we see what’s actually going wrong.
Nah, I missed something. I didn’t notice that all host sides of the volume bind point to the same folder, and the contaienr side’s look strange as well.
Since you are using bind mounts, not really volumes, you have to set the right permissions on the host for all files. If that is not right, I understand why a config file canot be changed.
You have the user and group ID here to run the processes in the container:
If the file owner is different, the app in the container probbaly tries to change it, but has no permission as it is not root, so it cannot give it to another user or to itself.
Regarding the ini file, the docker-run shell script wants to create that, but your user has no access to that folder.
By the way dolibarr’s Docker image doesn’t look like it was designed to run as non-root as many commands in its start script requires a root user to work.
Sorry, my goal is to help you understand how you can solve your problem, not giving people the copy-paste ready solution unless it is too complex. I’m happy to rephrase anything you don’t understand first.
The dolibarr repo has an example docker compose file without the user parameter. You just need to remove the user parameter that I quoted from your message in my previous post. Then the container will start as root and will have permission to change the owner of files or create the ini file under the conf.d directory.
There is still no guarantee that it will work if there are other issues as well, but when you get a different error, we can interpret that too.