[FIX] docker missing volume for config of odoo

- fix of master password
This commit is contained in:
Mathieu Benoit 2020-08-10 15:52:51 -04:00
parent a16224e948
commit f30966d449
9 changed files with 32 additions and 14 deletions

View file

@ -5,7 +5,7 @@ services:
script:
- docker build -f docker/Dockerfile.base -t technolibre/erplibre-base:12.0 docker/
- docker build -f docker/Dockerfile.dev -t technolibre/erplibre:12.0 docker/
# - docker build -f docker/Dockerfile.dev -t technolibre/erplibre:12.0 docker/
- docker build -f docker/Dockerfile.pkg -t technolibre/erplibre:12.0-pkg docker/
after_success:

View file

@ -1,7 +1,7 @@
version: "3.3"
services:
ERPLibre:
image: technolibre/erplibre:12.0-pkg
image: technolibre/erplibre:1.0.1
ports:
- 8069:8069
- 8071:8071
@ -17,6 +17,7 @@ services:
volumes:
# See the volume section at the end of the file
- erplibre_data_dir:/home/odoo/.local/share/Odoo/
- erplibre_conf:/etc/odoo
db:
image: postgres:12.3
@ -33,4 +34,5 @@ services:
# - docker-compose down --help
volumes:
erplibre_data_dir:
erplibre_conf:
erplibre-db-data:

View file

@ -1,5 +1,5 @@
FROM debian:buster-slim
MAINTAINER TechnoLibre <info@technolibre.ca>
MAINTAINER TechnoLibre <docker@technolibre.ca>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
@ -113,6 +113,7 @@ RUN groupadd --gid 101 --force odoo && \
# TODO delete poetry installation
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
#curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
@ -133,11 +134,11 @@ RUN chown odoo $ODOO_RC
# Expose Odoo services
EXPOSE 8069 8071 8072
RUN mkdir -p /var/lib/odoo && \
chown odoo /var/lib/odoo && \
chmod 1777 /var/lib/odoo
#RUN mkdir -p /var/lib/odoo && \
# chown odoo /var/lib/odoo && \
# chmod 1777 /var/lib/odoo
VOLUME /var/lib/odoo
# VOLUME /var/lib/odoo
# Set default user when running the container
USER odoo

View file

@ -1,4 +1,4 @@
FROM technolibre/erplibre-base:12.0
FROM technolibre/erplibre-base:1.0.1
ENV REPO_MANIFEST_URL http://git.erplibre.ca/ERPLibre
ARG WORKING_BRANCH
@ -39,7 +39,12 @@ RUN cd $ODOO_PREFIX && \
./docker/repo_manifest_gen_org_prefix_path.py $ODOO_PREFIX/addons /etc/odoo/odoo.conf /etc/odoo/odoo.conf && \
head /etc/odoo/odoo.conf
user odoo
#RUN mkdir '/home/odoo/.local'
#RUN chown -R odoo '/home/odoo/.local'
USER odoo
RUN mkdir -p '/home/odoo/.local/share/Odoo/'
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View file

@ -105,3 +105,10 @@ You can change the home for docker, edit file `/etc/docker/daemon.json`
}
```
And restart docker service. You can delete all older location of docker or move it.
# Update docker
When building your docker with script
> ./script/docker_build.sh
You need to push your docker image and update your tag, like 1.0.1:
> docker push technolibre/erplibre:1.0.1

View file

@ -460,7 +460,7 @@ limit_time_real = 900
#
# (See chart above for recommended values)
#-----------------------------------------------------------------------------
; limit_memory_soft = 255652815
limit_memory_soft = 5368709120
#-----------------------------------------------------------------------------
# Hard limit on virtual memory, any worker exceeding the limit will be
@ -471,7 +471,7 @@ limit_time_real = 900
# using PDF does not work. We are unsure why but this was the lowest amount
# for it to work.
#-----------------------------------------------------------------------------
; limit_memory_hard = 1395864371
limit_memory_hard = 6710886400
#-----------------------------------------------------------------------------
# Number of requests a worker will process before being recycled and restarted.

View file

@ -4,10 +4,10 @@ cd docker
ARGS=--build-arg=WORKING_BRANCH=$(git rev-parse --abbrev-ref HEAD)
set -e
# Build base
docker build ${ARGS} -f Dockerfile.base -t technolibre/erplibre-base:12.0 .
docker build ${ARGS} -f Dockerfile.base -t technolibre/erplibre-base:1.0.1 .
# Build prod
docker build ${ARGS} -f Dockerfile.prod.pkg -t technolibre/erplibre:12.0-pkg .
docker build ${ARGS} -f Dockerfile.prod.pkg -t technolibre/erplibre:1.0.1 .
cd ..
docker-compose up -d

View file

@ -189,7 +189,9 @@ pyenv local 3.7.7
if [[ ! -d "${POETRY_PATH}" ]]; then
echo -e "\n---- Installing poetry for reliable python package ----"
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | ${PYTHON_EXEC}
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | ${PYTHON_EXEC}
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
python get-poetry.py -y --preview
fi
if [[ ! -d ${VENV_PATH} ]]; then

View file

@ -1,3 +1,4 @@
#!/usr/bin/env bash
source $HOME/.poetry/env
poetry add -vv $(grep -v ";" ./.venv/build_dependancy.txt | grep -v "*" | sed 's/==/@^/' )
# poetry export -f ./.venv/build_dependency.txt --dev | poetry run -- pip install -r /dev/stdin