-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odoo 11 - docker container cannot find the odoo.conf file when user tries to access application URL #181
Comments
I've encountered what looks like a similar issue and it appears to involve permissions of docker volume directories on the host. Without doing anything special, containerized odoo user doesn't have access to write to my volume directories and install will fail with similar log message, files do not get created in my Other docker images, like postgres for example, set permissions of volume directories properly from within the container at initial runtime -- maybe because the entrypoint script launches as root so that directory/file permissions can be changed before switching to executing as a non-root user. Here's what I use to navigate and automate this, and also create the initial odoo config file by copying it from the odoo docker image. Before launching odoo initially (I'm using docker-compose with odoo & postgres), run this to create volume directories on the host server with permissions of the containerized odoo user: DATA_DIR=/srv/odoo.mydomain.com
IMAGE_ODOO=odoo:11
# create volume directories with permissions of the odoo user within the container
# copy initial config file from the docker image
mkdir -p ${DATA_DIR}
chmod 777 ${DATA_DIR}
docker run -it --rm \
-v ${DATA_DIR}:/x \
--entrypoint /bin/bash \
${IMAGE_ODOO} \
-c 'cp -a /etc/odoo /x/config; cp -a /var/lib/odoo /x/web; cp -a /mnt/extra-addons /x/addons'
chmod 755 ${DATA_DIR} my odoo volumes in docker-compose.yml: volumes:
- ${DATA_DIR}/addons:/mnt/extra-addons
- ${DATA_DIR}/config:/etc/odoo
- ${DATA_DIR}/web:/var/lib/odoo |
Hi @sensorii Thanks for this solution but don't you have to synchronize your data folder again later if you want to have your data realy persistent ? What the usage of |
@weeger, this could have changed or been fixed by now. At the time, |
Not fixed. When mounting volumes with |
@ArturBumbu is this still an issue in 2024? Can you close if not needed? |
I am still encountering this issue however my instance is using odoo17 not odoo11 so I am not sure if that makes this applicable to or not. |
Can anyone share methods of reproducing this? Docker commands, Docker compose files?
Can someone show that their odoo.conf is not readable. Here is a fast test I did
|
ubuntu@vm2:/tmp$ sudo docker run -it --entrypoint /bin/bash -v ~/tmp/odoo:/etc/odoo odoo:17.0 |
@aitmlouk Would you kindly On a related note, why are you using |
Becuase they're probably not a member of the docker group. |
The logs from docker container are below:
grep: /etc/odoo/odoo.conf: No such file or directory
grep: /etc/odoo/odoo.conf: No such file or directory
grep: /etc/odoo/odoo.conf: No such file or directory
grep: /etc/odoo/odoo.conf: No such file or directory
2018-03-22 22:36:04,827 1 INFO ? odoo: Odoo version 11.0-20180122
2018-03-22 22:36:04,827 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons']
2018-03-22 22:36:04,827 1 INFO ? odoo: database: odoo@db:5432
2018-03-22 22:36:04,836 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
2018-03-22 22:36:04,920 1 INFO ? odoo.addons.base.ir.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2018-03-22 22:37:12,335 1 INFO ? odoo.http: HTTP Configuring static files
The text was updated successfully, but these errors were encountered: