idhub build: add detach on production env

This commit is contained in:
pedro 2023-11-03 09:59:56 +01:00
parent f68e1638fc
commit 93d1f2d01c
1 changed files with 8 additions and 1 deletions

View File

@ -6,10 +6,17 @@ set -u
set -x set -x
main() { main() {
deployment="${1:-}"
# detach on production deployment
if [ "${deployment}" = 'prod' ]; then
detach='-d'
fi
idhub_dc_f='docker-compose_idhub-temp.yml' idhub_dc_f='docker-compose_idhub-temp.yml'
docker compose -f ${idhub_dc_f} down -v \ docker compose -f ${idhub_dc_f} down -v \
&& make docker_build \ && make docker_build \
&& docker compose -f ${idhub_dc_f} up && docker compose -f ${idhub_dc_f} up ${detach:-}
} }
main "${@}" main "${@}"