idhub build: add detach on production env
This commit is contained in:
parent
f68e1638fc
commit
93d1f2d01c
|
@ -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 "${@}"
|
||||||
|
|
Reference in New Issue