安装docker
参考菜鸟教程
curl -sSL https://get.daocloud.io/docker | sh
使用docker安装odoo
参考官方文档
安装PostgreSQL
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:13
安装odoo
docker run -p 8069:8069 --name odoo --link db:db -t odoo
使用docker-compose安装
docker-compose.yml
version: "2"
services:
odoo:
restart: always
image: odoo:15.0
depends_on:
- db
ports:
- "8669:8069"
volumes:
- odoo15c-web-data:/var/lib/odoo
- ./odoo-config:/etc/odoo
- ./extra-addons:/mnt/extra-addons
db:
restart: always
image: postgres:13
ports:
- "8632:5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo15c-db-data:/var/lib/postgresql/data/pgdata
volumes:
odoo15c-web-data:
odoo15c-db-data:
./odoo-config/odoo.conf
[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
logrotate = True
logfile = /var/lib/odoo/log/odoo.log
admin_passwd = Winway2018
;dbfilter = ^%d$
proxy_mode = True
; csv_internal_sep = ,
; db_maxconn = 64
; db_name = False
; db_template = template1
; dbfilter = .*
; debug_mode = False
; email_from = False
; limit_memory_hard = 2684354560
; limit_memory_soft = 2147483648
; limit_request = 8192
limit_time_cpu = 600
limit_time_real = 600
; list_db = True
; log_db = False
; log_handler = [':INFO']
; log_level = info
; logfile = None
longpolling_port = 8072
max_cron_threads = 2
; osv_memory_age_limit = 1.0
; osv_memory_count_limit = False
; smtp_password = False
; smtp_port = 25
; smtp_server = localhost
; smtp_ssl = False
; smtp_user = False
workers = 9
; xmlrpc = True
; xmlrpc_interface =
; xmlrpc_port = 8069
; xmlrpcs = True
; xmlrpcs_interface =
; xmlrpcs_port = 8071
运行
docker-compose up -d