Dockge problem launching Odoo

Trying to launch Odoo after some trouble launching Odoo as an app. This is the yaml file I use to compose Odoo with Dockge:

services:
db:
image: postgres:17-alpine
user: root
expose:
- 5432
env_file:
- .env
environment:
- POSTGRES_USER=***
- POSTGRES_PASSWORD=***
- POSTGRES_DB=***
restart: always
volumes:
- /mnt/Systeem/Odoo/Data:/var/lib/postgresql/data
odoo18:
image: odoo:18.0
container_name: odoo18
user: root
depends_on:
- db
ports:
- 10018:8069
- 20018:8072 # live chat
env_file:
- .env
tty: true
command: sh -c “chmod +x /entrypoint.sh && /entrypoint.sh”
environment:
- HOST=***
- USER=***
- PASSWORD=***
- PIP_BREAK_SYSTEM_PACKAGES=1
- ODOO_ADMIN_PASSWORD=***
volumes:
- /mnt/Systeem/Odoo/Entrypoint:/entrypoint.sh
- /mnt/Systeem/Odoo/Addons:/mnt/extra-addons
- /mnt/Systeem/Odoo/Config:/etc/odoo
restart: always
networks: {}

DB is launching fine, but I get a failure notification from the odoo package:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/mnt/Systeem/Odoo/Entrypoint” to rootfs at “/entrypoint.sh”: create mountpoint for /entrypoint.sh mount: cannot create subdirectories in “/mnt/.ix-apps/docker/overlay2/a549fa9487c846017096f4dd0a8bcff3f8f18bf44611ffe50481a88960556c35/merged/entrypoint.sh”: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

In the shell I cannot see the .ix-apps folder. I don’t know how to get the rights to see this folder. Tried different settings foor root- and other users to access shell with more rights, but the folder is not shown…

How can I solve this problem?

Yes. Yes, you are:

Hi @dan, thanks for your reply. I know I mount a directory to a file, but when I put the original line (from Github where I got the yaml) - ./entrypoint.sh:/entrypoint.sh, i got the same error. I got this feeling that this is a rights thing, any idea how to solve this?

your path should look like this:

Thank you @LarsR. Tried your line and got this (same) response:

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting “/mnt/Systeem/Odoo/Entrypoint/entrypoint.sh” to rootfs at “/entrypoint.sh”: create mountpoint for /entrypoint.sh mount: cannot create subdirectories in “/mnt/.ix-apps/docker/overlay2/c90e4866077e660bf795fe796203f63d64bfa7d98921e6d830c785fbf6aecb61/merged/entrypoint.sh”: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Where on Github?

Hm. This looks similar…

So many problems there that I don’t know where to start. For one, notwithstanding the repo description, there’s nothing in the Compose file that does anything with nginx, reverse proxy, or SSL, despite distributing a private key in clear text. But it’s in the -dev version of the Compose file (though commented out)?

But the more immediate problem is that the entrypoint.sh file in that repo is brain-damaged–first in that its test for the database to be up is just sleep 10, second that it’s trying to run an invalid command to start Odoo.

How did you come upon this terribly-broken compose stack? There’s a good start at an official one here:
https://hub.docker.com/_/odoo

Based on the compose file there, here’s a basic working Compose file for Odoo 18 with Postgres 17:

services:
  web:
    image: odoo:18.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - ./odoo:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
    environment:
      - PASSWORD_FILE=/run/secrets/postgresql_password
    secrets:
      - postgresql_password
  db:
    image: postgres:17
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - ./db:/var/lib/postgresql/data/pgdata
    secrets:
      - postgresql_password

secrets:
  postgresql_password:
    file: odoo_pg_pass

Create the stack in Dockge, paste this in, and save it. Do not deploy yet.

Browse to the relevant stacks directory and create a file there called odoo_pg_pass. In that file, place a password for the database.

Also in the relevant stacks directory, create a directory called odoo. Then chown _apt:_apt odoo.

Now you should be able to deploy the stack. From here, you’re on your own; I don’t use Odoo so couldn’t help further. Obvious improvements (which I’d strongly recommend) would include saving the database data outside the stacks directory, and possibly putting the odoo directory somewhere else as well. Integration with your preferred reverse proxy is left as an exercise for the reader.

Thank you, @dan, you put quite a lot of effort in it. It’s quite a steep learning curve for me. As always, I am learning and doing/testing at the same time. Sometimes I know I really have to start by reading and learning first Linux, then Docker and after that building and testing. But it’s always the other way around. But anyway, thanks for your input. It was very helpful.