コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4 返信
44982 ビュー

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?

アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

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.


アバター
破棄
著作者 最善の回答

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.            

アバター
破棄

@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?

関連投稿 返信 ビュー 活動
1
7月 20
16
2
11月 24
4435
2
9月 23
2391
1
1月 24
16767
3
9月 21
7092