From ff93eb34b01113acaac67466e4d97a99480f6dc2 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Wed, 22 Nov 2017 10:00:25 +0100 Subject: [PATCH] [UP] Adapt launcher regarding Gissmo 2.x experimental branch structure --- config.example | 1 + launch.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config.example b/config.example index a987356..d9a6973 100644 --- a/config.example +++ b/config.example @@ -20,5 +20,6 @@ DB_DIR="/dbdata" GIT_BRANCH="v1.7" GISSMO_VERSION="1.7" # GISSMO_DOCKER_NAME="gissmo" +DJANGO_DIR="django" # only for Gissmo 2.x GISSMO_DOCKER_PORT="8002" UPLOAD_DIR="/srv/upload" diff --git a/launch.sh b/launch.sh index 76aede0..f7c33c8 100755 --- a/launch.sh +++ b/launch.sh @@ -47,6 +47,13 @@ fi GISSMO_DIR="${PROJECT_DIR}/${GIT_DIR_NAME}" DOCKERFILE="${GISSMO_DIR}/${DOCKERFILE_NAME}" +# Set DJANGO_VOLUME_DIR +if ! test -z "$DJANGO_DIR"; then + DJANGO_VOLUME_DIR="${GISSMO_DIR}/$DJANGO_DIR" +else + DJANGO_VOLUME_DIR="${GISSMO_DIR}" +fi + ## Miscellaneous COMMAND="$1" shift 1; ARGS="$@" @@ -185,7 +192,7 @@ dev() { if [ $GISSMO_DEV_RUNNING_PORT -eq 0 ]; then PORT_PARAM=" -P " fi - $docker_cmd run -it --rm --link ${POSTGRES_DOCKER_NAME}:db ${PORT_PARAM} -v ${GISSMO_DIR}:/opt/gissmo -v ${UPLOAD_DIR}:/data gissmo:${GISSMO_VERSION} ${ARGS:='development'} || error_and_quit "Failed to create and launch ${GISSMO_DOCKER_NAME} container." + $docker_cmd run -it --rm --link ${POSTGRES_DOCKER_NAME}:db ${PORT_PARAM} -v ${DJANGO_VOLUME_DIR}:/opt/gissmo -v ${UPLOAD_DIR}:/data gissmo:${GISSMO_VERSION} ${ARGS:='development'} || error_and_quit "Failed to create and launch ${GISSMO_DOCKER_NAME} container." } test_backup() {