+6 votes
2.8k views

I launched a odoo 12 docker image on a DigitalOcean droplet based on this tutorial: https://docs.docker.com/samples/library/odoo/

When I try to access odoo I have a 500 error page:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Here is the result of my docker run command whentrying to access the Odoo web page :

Maybe he can't find the user odoo in the PostgreSQL database?

in Server by (1.3k points) | 2.8k views

3 Answers

+6 votes
Best answer

I found the problem.

In fact the DigitalOcean droplet use a different keyboard configuration than mine. When I use the character  "_ " it puts me in the place  "-".

To launch the PostgreSQL container I made this command  

docker run -d -e POSTGRES-USER=odoo -e POSTGRES-PASSWORD=*** -e POSTGRES-DB=postgres --name db postgres:10

instead of that there  

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=*** -e POSTGRES_DB=postgres --name db postgres:10 

On Windows to overcome this problem I have to use the codes ALT: [ALT + 95] =  "_ " and [ALT + 58] =  ": "

Thank you for your support.

by (1.3k points)
+3 votes

Hi,

you need to add user odoo with this commande:

sudo su - postgres -c "createuser -s odoo"

by (6k points)
+3 votes

First Try

$ docker exec -it postgresql-master sudo -u postgres psql

Then, within the container, create a new db, user, pass like this:

CREATE USER odoo SUPERUSER PASSWORD 'your_password';

and 
$ docker restart <postgres_container>

you can follow this video to install odoo on docker
 
by (8.8k points)
edited by

When trying this :

$ docker exec -it postgresql-master sudo -u postgres psql

I got an error :

"exec: \"sudo"\: executable file not found in $PATH": unknown

205 questions
180 answers
37 comments
220,700 users