erplibre/script/docker_build.sh
Mathieu Benoit 8facd58991 [ADD] docker add update_all_db and stop_before_init
- stop_before_init wait before launch odoo script
- update_all_db for an update of database
- docker_build.sh add --no-cache option
- Increate limit_time in odoo_conf
2020-10-25 02:01:52 -04:00

30 lines
615 B
Bash
Executable file

#!/usr/bin/env bash
. ./env_var.sh
ARGS=""
for arg in "$@"
do
if [ "$arg" == "--no-cache" ]
then
ARGS="${ARGS} --no-cache"
fi
done
# Rewrite docker-compose
./script/docker_update_version.py --version=${ERPLIBRE_VERSION} --base=${ERPLIBRE_DOCKER_BASE} --prod=${ERPLIBRE_DOCKER_PROD}
cd docker
ARGS="${ARGS} --build-arg=WORKING_BRANCH=$(git rev-parse --abbrev-ref HEAD)"
set -e
# Build base
docker build ${ARGS} -f Dockerfile.base -t ${ERPLIBRE_DOCKER_BASE_VERSION} .
# Build prod
docker build ${ARGS} -f Dockerfile.prod.pkg -t ${ERPLIBRE_DOCKER_PROD_VERSION} .
cd -
docker-compose up -d