[IMP] Launch script: 'dev' command now permit to be launched multiple times
This commit is contained in:
parent
3042f5c813
commit
4e31ec2e4a
12
launch.sh
12
launch.sh
@ -186,14 +186,12 @@ create() {
|
|||||||
|
|
||||||
dev() {
|
dev() {
|
||||||
initial_start
|
initial_start
|
||||||
# Run existing Docker container, otherwise create a new one
|
PORT_PARAM=" -p ${GISSMO_DOCKER_PORT}:8000 "
|
||||||
GISSMO_RUNNING=$($docker_cmd inspect --format="{{ .State.Running }}" ${GISSMO_DOCKER_NAME} 2> /dev/null)
|
GISSMO_DEV_RUNNING_PORT=$(nc -z 127.0.0.1 ${GISSMO_DOCKER_PORT} &> /dev/null; echo $?)
|
||||||
if [ $? -eq 1 ]; then
|
if [ $GISSMO_DEV_RUNNING_PORT -eq 0 ]; then
|
||||||
$docker_cmd run -it --rm --link ${POSTGRES_DOCKER_NAME}:db -p ${GISSMO_DOCKER_PORT}:8000 -v ${GISSMO_DIR}:/opt/gissmo --name ${GISSMO_DOCKER_NAME} gissmo:${GISSMO_VERSION} ${ARGS:='development'} || error_and_quit "Failed to create and launch ${GISSMO_DOCKER_NAME} container."
|
PORT_PARAM=" -P "
|
||||||
else
|
|
||||||
error_and_quit "${GISSMO_DOCKER_NAME} is already launched! If you need
|
|
||||||
another name please set GISSMO_DOCKER_NAME in configuration file."
|
|
||||||
fi
|
fi
|
||||||
|
$docker_cmd run -it --rm --link ${POSTGRES_DOCKER_NAME}:db ${PORT_PARAM} -v ${GISSMO_DIR}:/opt/gissmo gissmo:${GISSMO_VERSION} ${ARGS:='development'} || error_and_quit "Failed to create and launch ${GISSMO_DOCKER_NAME} container."
|
||||||
}
|
}
|
||||||
|
|
||||||
test_backup() {
|
test_backup() {
|
||||||
|
Loading…
Reference in New Issue
Block a user