[ADD] docker: format docker-compose and add doc docker readme
- docker delete ~/.poetry in creation
This commit is contained in:
parent
bf4ee28223
commit
5ec0b1c447
3 changed files with 43 additions and 39 deletions
|
|
@ -1,43 +1,43 @@
|
||||||
version: "3.3"
|
version: "3.3"
|
||||||
services:
|
services:
|
||||||
ERPLibre:
|
ERPLibre:
|
||||||
image: technolibre/erplibre:1.2.1
|
image: technolibre/erplibre:1.2.1
|
||||||
ports:
|
ports:
|
||||||
- 8069:8069
|
- 8069:8069
|
||||||
- 8071:8071
|
- 8071:8071
|
||||||
- 8072:8072
|
- 8072:8072
|
||||||
environment:
|
environment:
|
||||||
HOST: db
|
HOST: db
|
||||||
PASSWORD: mysecretpassword
|
PASSWORD: mysecretpassword
|
||||||
USER: odoo
|
USER: odoo
|
||||||
POSTGRES_DB: postgres
|
POSTGRES_DB: postgres
|
||||||
STOP_BEFORE_INIT: "False"
|
STOP_BEFORE_INIT: "False"
|
||||||
DB_NAME: ""
|
DB_NAME: ""
|
||||||
UPDATE_ALL_DB: "False"
|
UPDATE_ALL_DB: "False"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
# not behind a proxy
|
# not behind a proxy
|
||||||
#command: odoo --workers 0
|
#command: odoo --workers 0
|
||||||
# behind a proxy
|
# behind a proxy
|
||||||
#command: odoo --workers 2
|
#command: odoo --workers 2
|
||||||
command: odoo
|
command: odoo
|
||||||
volumes:
|
volumes:
|
||||||
# See the volume section at the end of the file
|
# See the volume section at the end of the file
|
||||||
- erplibre_data_dir:/home/odoo/.local/share/Odoo
|
- erplibre_data_dir:/home/odoo/.local/share/Odoo
|
||||||
- ./addons/addons:/ERPLibre/addons/addons
|
- ./addons/addons:/ERPLibre/addons/addons
|
||||||
- erplibre_conf:/etc/odoo
|
- erplibre_conf:/etc/odoo
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgis/postgis:12-3.1-alpine
|
image: postgis/postgis:12-3.1-alpine
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: mysecretpassword
|
POSTGRES_PASSWORD: mysecretpassword
|
||||||
POSTGRES_USER: odoo
|
POSTGRES_USER: odoo
|
||||||
POSTGRES_DB: postgres
|
POSTGRES_DB: postgres
|
||||||
PGDATA: /var/lib/postgresql/data/pgdata
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
volumes:
|
volumes:
|
||||||
- erplibre-db-data:/var/lib/postgresql/data/pgdata
|
- erplibre-db-data:/var/lib/postgresql/data/pgdata
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# We configure volume without specific destination to let docker manage it. To configure it through docker use (read related documentation before continuing) :
|
# We configure volume without specific destination to let docker manage it. To configure it through docker use (read related documentation before continuing) :
|
||||||
# - docker volume --help
|
# - docker volume --help
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ RUN cd $ODOO_PREFIX && \
|
||||||
RUN cd $ODOO_PREFIX && \
|
RUN cd $ODOO_PREFIX && \
|
||||||
./script/update_manifest_dev.sh
|
./script/update_manifest_dev.sh
|
||||||
|
|
||||||
# TODO delete poetry installation
|
|
||||||
# Install Poetry
|
# Install Poetry
|
||||||
RUN cd $ODOO_PREFIX && \
|
RUN cd $ODOO_PREFIX && \
|
||||||
curl -sSL -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && \
|
curl -sSL -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && \
|
||||||
|
|
@ -43,7 +42,8 @@ RUN cd $ODOO_PREFIX && \
|
||||||
RUN cd $ODOO_PREFIX && \
|
RUN cd $ODOO_PREFIX && \
|
||||||
./.venv/bin/pip install --upgrade pip && \
|
./.venv/bin/pip install --upgrade pip && \
|
||||||
./.venv/bin/python ~/.poetry/bin/poetry install && \
|
./.venv/bin/python ~/.poetry/bin/poetry install && \
|
||||||
rm -rf artifacts
|
rm -rf artifacts && \
|
||||||
|
rm -rf ~/.poetry
|
||||||
|
|
||||||
RUN cd $ODOO_PREFIX/.venv && \
|
RUN cd $ODOO_PREFIX/.venv && \
|
||||||
curl https://raw.githubusercontent.com/ERPLibre/multilingual-markdown/master/multilang_md.py > ./multilang_md.py && \
|
curl https://raw.githubusercontent.com/ERPLibre/multilingual-markdown/master/multilang_md.py > ./multilang_md.py && \
|
||||||
|
|
|
||||||
|
|
@ -121,3 +121,7 @@ List your docker version
|
||||||
|
|
||||||
You need to push your docker image and update your tag, like 1.0.1:
|
You need to push your docker image and update your tag, like 1.0.1:
|
||||||
> docker push technolibre/erplibre:VERSION
|
> docker push technolibre/erplibre:VERSION
|
||||||
|
|
||||||
|
# Diagnostic
|
||||||
|
When getting and error about missing module, or after an upgrade, you need to update config file.
|
||||||
|
> make docker_exec_erplibre_gen_config
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue