23 lines
428 B
Bash
Executable File
23 lines
428 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -u
|
|
# DEBUG
|
|
set -x
|
|
|
|
main() {
|
|
deployment="${1:-}"
|
|
|
|
# detach on production deployment
|
|
if [ "${deployment}" = 'prod' ]; then
|
|
detach='-d'
|
|
fi
|
|
|
|
idhub_dc_f='docker-compose_idhub-temp.yml'
|
|
docker compose -f ${idhub_dc_f} down -v \
|
|
&& make docker_build \
|
|
&& docker compose -f ${idhub_dc_f} up ${detach:-}
|
|
}
|
|
|
|
main "${@}"
|