Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
44910 Visualizzazioni

I am getting an "Internal Server Error" when trying to install Odoo 12 Community Edition on an AWS EC2 instance using a docker-compose file. My EC2 instance uses Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1031-aws x86_64) operating system, Docker version 18.09.0 and docker-compose version 1.23.2. 

Here is my docker-compose.yml file:

version: '2'
services:
  web:
    image: odoo:12.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
  db:
    image: postgres:10
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
  odoo-web-data:
  odoo-db-data:


I can see the containers being created as is evidenced by the following output of the "docker ps -a" command:

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                              NAMES

64e271db9565        odoo:12.0           "/entrypoint.sh odoo"    2 hours ago         Up 2 hours          0.0.0.0:8069->8069/tcp, 8071/tcp   ubuntu_web_1

10b3198e3230        postgres:10         "docker-entrypoint.s…"   2 hours ago         Up 2 hours          5432/tcp                           ubuntu_db_1

Moreover, the "docker-compose config" command returned the following output:

services:
  db:
    environment:
      PGDATA: /var/lib/postgresql/data/pgdata
      POSTGRES_PASSWORD: odoo
      POSTGRES_USER: odoo
    image: postgres:10
    volumes:
    - odoo-db-data:/var/lib/postgresql/data/pgdata:rw
  web:
    depends_on:
    - db
    image: odoo:12.0
    ports:
    - 8069:8069/tcp
    volumes:
    - odoo-web-data:/var/lib/odoo:rw
    - /home/ubuntu/config:/etc/odoo:rw
    - /home/ubuntu/addons:/mnt/extra-addons:rw
version: '2.0'
volumes:
  odoo-db-data: {}
  odoo-web-data: {}

What am I missing here?

Avatar
Abbandona
Risposta migliore

Try running "docker logs ubuntu_web_1".  You may find that your database has not been initialized.

Avatar
Abbandona
Risposta migliore

Hello Rupam Kundu,

You have installed odoo 12 on which OS ? Ubuntu or Debian ? Can you please message me on ashish.mhatre@rediffmail.com if you have some steps written down to install that on docker.


Avatar
Abbandona
Autore Risposta migliore

Yes Richard, you are right. On running "docker logs ubuntu_web_1" I did find that my database had not been initialized. Finally my issue got resolved by implementing the fix suggested in https://github.com/odoo/odoo/issues/27447#issuecomment-441239348.

Particularly, I replaced my docker-compose.yml with the one at https://gist.github.com/byk0t/a9644fd2360a9662702568459df289fc and my issue got resolved.            

Avatar
Abbandona

@Rupam, I encounter the same issue but the Gist link you pasted does not solve it for me. The database is still not ready when Odoo container is started. Any idea why? What declaration in the docker-compose.yml file provided in the link makes it work for you?

Post correlati Risposte Visualizzazioni Attività
1
lug 20
16
2
nov 24
4410
2
set 23
2360
1
gen 24
16725
3
set 21
7048