This commit is contained in:
mtpc4s9 2025-11-18 23:01:22 +07:00
parent 0a5368bb64
commit bcc07836d4

View File

@ -3,33 +3,31 @@ version: '3.1' # Nâng cấp version lên chuẩn mới hơn
services:
db:
image: postgres:17
# ĐÃ XÓA "user: root". Hãy để nó tự chạy bằng user "postgres".
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo18@2024
- POSTGRES_DB=postgres
restart: always
volumes:
# Dùng Named Volume thay vì thư mục ./postgresql để tránh lỗi permission
- pgdata:/var/lib/postgresql/data
odoo18:
image: odoo:18
# ĐÃ XÓA "user: root". Hãy để nó tự chạy bằng user "odoo".
depends_on:
- db
ports:
- "10018:8069"
- "20018:8072"
tty: true
# Chỉ định rõ file config
command: --config /etc/odoo/odoo.conf
command: -- --config /etc/odoo/odoo.conf
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo18@2024
- PIP_BREAK_SYSTEM_PACKAGES=1
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./addons:/mnt/extra-addons
- ./etc:/etc/odoo
restart: always