diff --git a/Dockerfile b/Dockerfile index bd687d9..38fcb67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,9 @@ RUN apt-get update && apt-get install make COPY . /srv/everware WORKDIR /srv/everware/ -RUN make install +RUN cd $(npm root -g)/npm && npm install fs-extra \ + && sed -i -e s/graceful-fs/fs-extra/ -e s/fs.rename/fs.move/ ./lib/utils/rename.js +RUN make clean install EXPOSE 8000 EXPOSE 8081 diff --git a/Makefile b/Makefile index 553ce87..7aa9c99 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,8 @@ install: ## install everware if [ ! -f env.sh ] ; then cp env.sh.orig env.sh ; fi -ogs: ${LOG} ## watch log file - tail -f ${LOG} +docker-build: ## build docker image + docker build --no-cache -t everware/everware:0.10.0 . test: ## run all tests export UPLOADDIR=${UPLOADDIR}; \ diff --git a/etc/container_config.py b/etc/container_config.py index 06620cb..4179876 100644 --- a/etc/container_config.py +++ b/etc/container_config.py @@ -4,6 +4,8 @@ # In case of local, don't forget to mount /var/run/docker.sock # In case of remote, don't forget the DOCKER_HOST environment variable +import os + c = get_config() load_subconfig('etc/base_config.py') load_subconfig('etc/github_auth.py') diff --git a/etc/container_swarm_config.py b/etc/container_swarm_config.py index e9a7262..a2c716a 100644 --- a/etc/container_swarm_config.py +++ b/etc/container_swarm_config.py @@ -5,6 +5,8 @@ # but don't forget to set Docker Swarm environment # variables in the env file +import os + c = get_config() load_subconfig('etc/base_config.py') load_subconfig('etc/github_auth.py') diff --git a/everware/__init__.py b/everware/__init__.py index c2a74b6..64c6479 100755 --- a/everware/__init__.py +++ b/everware/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.10.0" +__version__ = "0.10.1" from .spawner import * from .authenticator import * from .user_spawn_handler import * diff --git a/everware/user_wait_handler.py b/everware/user_wait_handler.py index 87a9bcd..5fa3655 100755 --- a/everware/user_wait_handler.py +++ b/everware/user_wait_handler.py @@ -47,9 +47,7 @@ def get(self, name, user_path): else: if is_up: self.set_login_cookie(current_user) - target = '%s://%s/user/%s' % ( - self.request.protocol, - self.request.host, + target = '/user/%s' % ( current_user.name ) self.log.info('redirecting to %s' % target) diff --git a/run.makefile b/run.makefile index 06bf43b..229fca3 100644 --- a/run.makefile +++ b/run.makefile @@ -21,9 +21,10 @@ run-dockermachine: clean ## run everware server on MacOS ${EXECUTOR} -f etc/local_dockermachine_config.py --no-ssl 2>&1 | tee ${LOG} run-daemon: clean ## run everware in daemon mode, linux only, SSL required + [ -f ${LOG} ] && mv ${LOG} ${LOG}.`date +%Y%m%d-%s` source ./env.sh && \ - ${EXECUTOR} -f etc/local_config.py >> ${LOG} 2>&1 & - pgrep ${EXECUTOR} > ${PIDFILE} || ( tail ${LOG} && exit 1 ) + ${EXECUTOR} -f etc/local_config.py --debug --no-ssl >> ${LOG} 2>&1 & + pgrep ${EXECUTOR} > ${PIDFILE} || ( tail ${LOG} && rm ${PIDFILE} && exit 1 ) echo "Started. Log saved to ${LOG}" stop: