odoo / docker

Other
932 stars 1.52k forks source link

Odoo/docker documentation on Docker Hub missing critical step for simple example - style sheets missing is common result #369

Open tim-win opened 3 years ago

tim-win commented 3 years ago

The base example in the odoo docker docs is missing a required step:

Start a PostgreSQL server
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
Start an Odoo instance
$ docker run -p 8069:8069 --name odoo --link db:db -t odoo

Should be

Start a PostgreSQL server
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
Create a volume for web data
$ docker create odoo-web-data
Start an Odoo instance
$ docker run -p 8069:8069 --name odoo -v odoo-web-data:/var/lib/odoo --link db:db -t odoo

Running the single image version of odoo without a volume for web data will lose stylesheets any other content in the filestore that is generated at initial DB creation and bootstrap if the container is removed cleaned up.

The fix is simple- add a step to create the odoo-web-data volume, and then mounting it to the docker run command.

When the volume is not present, a recycling of the odoo image will lose filestore data, and stylesheets will 404 when the frontend tries to retrieve them.

Ricoamal commented 2 years ago

Hi am facing an issue here. I cant locate odoo neither the addons folder. i have used these two commands.

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name mydb postgres

docker run -v odoo\addon:/mnt/extra-addons -p 8069:8069 --name myisntance --link mydb:db -t odoo


am using winscp to see my files n folders

below is a screenshot Screenshot_2 .

lathama commented 3 months ago

@tim-win changes to that doc would be best done via a PR to https://github.com/docker-library/docs/blob/master/odoo/content.md