feat: Add env var for enterprise directory & improve readme

This commit is contained in:
Matt Marcha 2025-01-21 14:00:24 -10:00
parent 3d82e44f94
commit 98bc91076d
4 changed files with 11 additions and 18 deletions

View file

@ -1,3 +1,4 @@
ODOO_VERSION=17.0 ODOO_VERSION=17.0
COMMAND=-d odoo COMMAND=-d odoo
PG_VERSION=14.12 #Moved to 14.15 in Odoo 18 PG_VERSION=14.12 #Moved to 14.15 in Odoo 18
ENTERPRISE_PATH=/local/path/to/enterprise/modules

2
.gitignore vendored
View file

@ -1,5 +1,5 @@
.env .env
odoo odoo
enterprise enterprise
modules/ modules/*
.idea/ .idea/

View file

@ -4,18 +4,10 @@ Odoo local environment boilerplate with Docker/Podman, for development purpose
## Setup ## Setup
Create enterprise directory (Enterprise&Odoo versions must match) - or delete it from compose and odoo.conf files If not enterprise version, remove the enterprise line in compose file
Put your custom modules in `./modules`
```shell From env.dist, create an .env file in the project directory root to set up environment variables
ln -s /path/to/you/enterprise/modules enterprise
```
Create an .env file in the project directory root to set up environment variables :
```file:./.env
ODOO_VERSION=18.0
COMMAND=-d odoo
```
## Start ## Start
@ -29,9 +21,9 @@ You can use the COMMAND var to custom the command at launch :
COMMAND="-d odoo -i mymodule" docker-compose up -d COMMAND="-d odoo -i mymodule" docker-compose up -d
``` ```
## Links (localhost) ## Use
Odoo at (http://localhost:8089/web)[https://localhost:8089/web] Odoo at [localhost:8089/web](http://localhost:8089/web)
Odoo database manager at (http://localhost:8089/web)[https://localhost:8089/web/database/manager] Odoo database manager at [localhost:8089/web/database/manager](http://localhost:8089/web)
Mailcatcher at (http://localhost:1080/)[http://localhost:1080/] Mailcatcher at [localhost:1080/](http://localhost:1080/)

View file

@ -9,7 +9,7 @@ services:
- odoo-web:/var/lib/odoo - odoo-web:/var/lib/odoo
- ./config:/etc/odoo - ./config:/etc/odoo
- ./modules:/mnt/extra-addons - ./modules:/mnt/extra-addons
- ./enterprise:/mnt/enterprise - ${ENTERPRISE_PATH}:/mnt/enterprise
command: "odoo ${COMMAND}" command: "odoo ${COMMAND}"
db: db:
image: "postgres:${PG_VERSION}" image: "postgres:${PG_VERSION}"