Skip to content

Commit

Permalink
Merge pull request #241 from rubencabrera/11-doc-docker
Browse files Browse the repository at this point in the history
doc docker
  • Loading branch information
rubencabrera authored Jul 5, 2024
2 parents 7dc779b + cf7e06d commit a094b01
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ config (see section below, look at `DB_FILTER` especially for local
development).
1. Run `docker-compose up` in the root path.

### Developing using this image

With the provided `docker-compose.yml`, all the repos will be in the code
volume, named using the environment variable `$ODOO_DOCKER_PROJECT_NAME`
(with a default value of `odoo_docker`).

The docker compose volume with the code configured in the given
`docker-compose.yml` will need an existing **empty** directory where the repos
will be cloned. The default path is
`${HOME}/.${ODOO_DOCKER_PROJECT_NAME}_repos` and can be overriden by setting
the `$ODOO_DOCKER_REPOS_HOST_PATH` (to an existing empty directory) before
running `docker-compose up`.

The repos are all cloned using git with `--depth=1`, so can be worked as any
other git repo.

## Odoo server config using environment variables

Odoo uses a config file that is a bit of a pain with a docker
Expand All @@ -47,10 +63,10 @@ same name in lower case:
| ENV var | Default value |
| --- | --- |
| `ADMIN_PASSWD` | `admin` |
| `CSV_INTERNAL_SEP` | `";"` |
| `CSV_INTERNAL_SEP` | `;` |
| `DATA_DIR` | `/var/lib/odoo` |
| `DB_HOST` | `db` |
| `DB_FILTER` | `"^%d"` |
| `DB_FILTER` | `^%d` |
| `DB_MAXCONN` | `64` |
| `DB_NAME` | `False` |
| `DB_PASSWORD` | `odoo` |
Expand All @@ -67,16 +83,16 @@ same name in lower case:
| `LIMIT_TIME_REAL` | `120` |
| `LIST_DB` | `True` |
| `LOG_DB` | `False` |
| `LOG_HANDLER` | `"[':INFO']"` |
| `LOG_HANDLER` | `[':INFO']` |
| `LOG_LEVEL` | `info` |
| `LOGROTATE` | `True` |
| `MAX_CRON_THREADS` | `2` |
| `OSV_MEMORY_COUNT_LIMIT` | `False` |
| `PIDFILE` | `None` |
| `PROXY_MODE` | `False` |
| `REPORTGZ` | `False` |
| `SECURE_CERT_FILE` | `"server.cert"` |
| `SECURE_PKEY_FILE` | `"server.pkey"` |
| `SECURE_CERT_FILE` | `server.cert` |
| `SECURE_PKEY_FILE` | `server.pkey` |
| `SERVER_WIDE_MODULES` | `None` |
| `SMTP_PASSWORD` | `False` |
| `SMTP_PORT` | `25` |
Expand All @@ -90,7 +106,7 @@ same name in lower case:
| `TEST_REPORT_DIRECTORY` | `False` |
| `TIMEZONE` | `False` |
| `TRANSIENT_AGE_LIMIT` | `1` |
| `TRANSLATE_MODULES` | `"['all']"` |
| `TRANSLATE_MODULES` | `['all']` |
| `UNACCENT` | `True` |
| `WITHOUT_DEMO` | `True` |
| `WORKERS` | `0` |
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ services:
condition: service_healthy
restart: true
environment:
# FIXME: might want to remove this for prod.
- DB_FILTER=.*
image: "rubencabrera/odoo-docker:16.1.0"
image: "rubencabrera/odoo-docker:16.1.1"
ports:
- "8069:8069"
- "8071:8071"
Expand Down
16 changes: 0 additions & 16 deletions odoo-server.service

This file was deleted.

0 comments on commit a094b01

Please sign in to comment.