Hi,
I am trying to test odoo deployment under docker on my testing PC without reverse proxy. After `docker-compose up`, I get the following error: `ERROR: relation "ir_module_module" does not exist at character 53`, and the browser at `https://localhost:8069/` says approximately: `Secure connexion failure - error while connecting to localhost:8069. PR_END_OF_FILE_ERROR`.
The terminal where I have launched `docker-compose up` logs:
db | PostgreSQL init process complete; ready for start up.
db |
db | 2022-09-11 16:52:28.526 UTC [1] LOG: starting PostgreSQL 14.5 (Debian 14\\.5\\-1\\.pgdg110\\+1\\)\\ on\\ x86_64\\-pc\\-linux\\-gnu,\\ compiled\\ by\\ gcc\\ \\(Debian\\ 10\\.2\\.1\\-6\\)\\ 10\\.2\\.1\\ 20210110,\\ 64\\-bit
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:52:28\\.526\\ UTC\\ \\[1\\]\\ LOG:\\ \\ listening\\ on\\ IPv4\\ address\\ "0\\.0\\.0\\.0",\\ port\\ 5432
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:52:28\\.526\\ UTC\\ \\[1\\]\\ LOG:\\ \\ listening\\ on\\ IPv6\\ address\\ "::",\\ port\\ 5432
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:52:28\\.529\\ UTC\\ \\[1\\]\\ LOG:\\ \\ listening\\ on\\ Unix\\ socket\\ "/var/run/postgresql/\\.s\\.PGSQL\\.5432"
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:52:28\\.534\\ UTC\\ \\[62\\]\\ LOG:\\ \\ database\\ system\\ was\\ shut\\ down\\ at\\ 2022\\-09\\-11\\ 16:52:28\\ UTC
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:52:28\\.541\\ UTC\\ \\[1\\]\\ LOG:\\ \\ database\\ system\\ is\\ ready\\ to\\ accept\\ connections
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:53:35\\.060\\ UTC\\ \\[76\\]\\ ERROR:\\ \\ relation\\ "ir_module_module"\\ does\\ not\\ exist\\ at\\ character\\ 53
db\\ \\ \\ \\ \\|\\ 2022\\-09\\-11\\ 16:53:35\\.060\\ UTC\\ \\[76\\]\\ STATEMENT:\\ \\
db\\ \\ \\ \\ \\|\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ SELECT\\ latest_version
db\\ \\ \\ \\ \\|\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ FROM\\ ir_module_module
db\\ \\ \\ \\ \\|\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ WHERE\\ name='base'
There\ is\ something\ interesting\ here, but it has changed nothing to the result for me:
Error about db not initialized may still show up when using volume:
volumes: - odoo-db-data:/var/lib/postgresql/data/pgdata # removing this volume removes the error
Somehow got it to work by:
docker-compose exec web bash odoo -i base -d odoo --stop-after-init --db_host=db -r odoo -w odoo ... re-up using docker-compose
Here is my `docker-compose.yml`:
version: '3.9'
services:
odoo:
container_name: odoo
image: odoo:15.0
volumes:
- ./extra-addons:/opt/odoo/extra-addons
- ./etc:/etc/odoo
- odoo-web-data:/var/lib/odoo
ports:
- "8069:8069"
depends_on:
- db
environment:
- PASSWORD_FILE=/run/secrets/postgresql_password
secrets:
- postgresql_password
restart: always
db:
container_name: db
image: postgres:14
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
- POSTGRES_USER=glopibuf
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
secrets:
- postgresql_password
ports:
- 5432:5432
restart: always
volumes:
odoo-web-data:
odoo-db-data:
secrets:
postgresql_password:
file: odoo_pg_pass
and my `odoo.conf`:
[options]
db_host = db
db_user = glopibuf
db_name = postgres
db_template = template0
db_maxconn = 64
db_filter = ^xxxxxx.*$
db_sslmode = allow
logfile = /var/log/odoo/openerp-server.log
logrotate = True
log-db = False
syslog = False
log-level = warn
interface = localhost
port = 8069
secure = True
proxy_mode = False
addons_path = /opt/odoo/extra-addons,/opt/openerp/odoo/addons,/home/myaddons
timezone = Europe/Paris
secure_cert_file = server.cert
secure_pkey_file = server.pkey
xmlrpcs = False
xmlrpcs_interface = 127.0.0.1
xmlrpcs_port = 8071
xmlrpc = False
xmlrpc_interface = 127.0.0.1
xmlrpc_port = 8069
longpolling_port = 8072
import_partial =
unaccent = False
translate_modules = ['all']
server_wide_modules = None
smtp_server = localhost
smtp_user = False
smtp_password = False
smtp_ssl = False
email_from = "xxx@yyy.com"
smtp_port = 25
workers = 1
max_cron_threads = 1
limit_time_cpu = 60
limit_time_real = 170
limit_memory_soft = 255652815
limit_memory_hard = 1395864371
limit_request = 8196
osv_memory_count_limit = False
osv_memory_age_limit = 1.0
test_enable = False
test_file = False
test_report_directory = False
test_commit = False
without_demo = none
Here is the project tree:
.
├── docker-compose.yml
├── etc
│ └── odoo.conf
├── extra-addons
├── odoo_pg_pass