diff --git a/scripts/docker_devboot.sh b/scripts/docker_devboot.sh index 3407f3ab8..5e51720c9 100755 --- a/scripts/docker_devboot.sh +++ b/scripts/docker_devboot.sh @@ -1,133 +1,135 @@ #!/usr/bin/env bash # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # location of the folder that gets shared between containers CFG_SHARED_FOLDER=/usr/local/var/invenio.base-instance # prints help text and exists with the given status print_help() { cat <> "$cfgfile" CFG_SITE_URL = u'http://localhost:5000' CFG_SITE_SECURE_URL = u'http://localhost:5000' CFG_REDIS_HOSTS = {'default': [{'db': 0, 'host': 'cache', 'port': 6379}]} CFG_BATCHUPLOADER_DAEMON_DIR = u'/home/invenio/var/batchupload' CFG_BIBDOCFILE_FILEDIR = u'/home/invenio/var/data/files' CFG_BIBEDIT_CACHEDIR = u'/home/invenio/var/tmp-shared/bibedit-cache' CFG_BIBSCHED_LOGDIR = u'/home/invenio/var/log/bibsched' CFG_BINDIR = u'/usr/local/bin' CFG_CACHEDIR = u'/home/invenio/var/cache' CFG_ETCDIR = u'/home/invenio/etc' CFG_LOCALEDIR = u'/home/invenio/share/locale' CFG_LOGDIR = u'/home/invenio/var/log' CFG_PYLIBDIR = u'/usr/local/lib/python2.7' CFG_RUNDIR = u'/home/invenio/var/run' CFG_TMPDIR = u'/tmp/invenio-`hostname`' CFG_TMPSHAREDDIR = u'/home/invenio/var/tmp-shared' CFG_WEBDIR = u'/home/invenio/var/www' CFG_WEBSUBMIT_BIBCONVERTCONFIGDIR = u'/home/invenio/etc/bibconvert/config' CFG_WEBSUBMIT_COUNTERSDIR = u'/home/invenio/var/data/submit/counters' CFG_WEBSUBMIT_STORAGEDIR = u'/home/invenio/var/data/submit/storage' DEPOSIT_STORAGEDIR = u'/home/invenio/var/data/deposit/storage' + +DEBUG = True EOF # load dev config /code/scripts/setup_devmode.sh # final shot inveniomanage database init --user=root --password=mysecretpassword --yes-i-know inveniomanage database create # remember that we reached this point touch $CFG_SHARED_FOLDER/initialized fi run "$@" } # run in slave mode # there can be multiple slaves # don't forget to run also run a master run_slave() { while [ ! -f $CFG_SHARED_FOLDER/initialized ]; do sleep 1 done run "$@" } if [ "$#" -lt 2 ]; then print_help 0 fi mode=$1 shift if [ "$mode" == "master" ]; then run_master "$@" elif [ "$mode" == "slave" ]; then run_slave "$@" else print_help 1 fi