====== Odoo: Docker install ======
===== Préparation =====
#Installation des paquets
apt install docker-compose acl
#Création des répertoires
mkdir -p docker_volume/odoo docker_volume/postgres
setfacl -d -m u:101:rwX -m u:$(whoami):rwX ./docker_volume/odoo
setfacl -m u:101:rwX -m u:$(whoami):rwX ./docker_volume/odoo
setfacl -d -m u:999:rwX -m u:$(whoami):rwX ./docker_volume/postgres
setfacl -m u:999:rwX -m u:$(whoami):rwX ./docker_volume/postgres
===== Docker configuration =====
nano docker-compose.yml
version: '3'
services:
odoo:
image: odoo:17.0
env_file: .env
depends_on:
- postgres
ports:
- 8069:8069
volumes:
- type: bind
source: ./docker_volume/odoo
target: /var/lib/odoo
postgres:
image: postgres:15
env_file: .env
volumes:
- type: bind
source: ./docker_volume/postgres
target: /var/lib/postgresql/data/pgdata
nano .env
# postgresql environment variables
POSTGRES_DB=postgres
POSTGRES_PASSWORD=a_strong_password_for_user
POSTGRES_USER=odoo
PGDATA=/var/lib/postgresql/data/pgdata
# odoo environment variables
HOST=postgres
USER=odoo
PASSWORD=a_strong_password_for_user
===== Utilisation de docker =====
# Pour lancer en mode foreground
docker-compose up
# Pour lancer en mode daemon
docker-compose up -d
# Pour stopper
docker-compose stop
===== Cloner le projet =====
git clone -b uat git@github.com:makeitsimple-git/mrp_timac.git docker_volume/odoo/addons/17.0/mrp_timac/