From 25744c2247592da1bee13e2978eb7d2c64539776 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Thu, 12 Mar 2015 15:04:23 +0100 Subject: [PATCH] Docker-compose: change media container to home and move sandbox to /home/timeside --- Dockerfile | 9 +-------- docker-compose.yml | 10 +++++----- .../{nginx/sites-enabled/app.conf => nginx-app.conf} | 2 +- examples/deploy/start_app.sh | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) rename examples/deploy/{nginx/sites-enabled/app.conf => nginx-app.conf} (86%) diff --git a/Dockerfile b/Dockerfile index 919c006..bf0bc40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,7 @@ WORKDIR /opt/TimeSide # Install binary dependencies with conda ADD conda-requirements.txt /opt/TimeSide/ -ADD requirements.txt /opt/TimeSide/ +#ADD requirements.txt /opt/TimeSide/ RUN conda install --file conda-requirements.txt && \ rm /opt/miniconda/lib/libm.so.6 # use the system libm; see github.com/ContinuumIO/anaconda-issues/issues/182 @@ -66,12 +66,6 @@ WORKDIR /opt/TimeSide RUN pip install -r requirements.txt -# setup all the configfiles --> Gérer dans le container Nginx -#RUN echo "daemon off;" >> /etc/nginx/nginx.conf -#RUN rm /etc/nginx/sites-enabled/default -#RUN ln -s /opt/TimeSide/examples/deploy/nginx-app.conf /etc/nginx/sites-enabled/ -#RUN ln -s /opt/TimeSide/examples/deploy/supervisor-app.conf /etc/supervisor/conf.d/ - # install new deps from the local repo #RUN pip install -e /opt/TimeSide @@ -84,4 +78,3 @@ RUN /opt/TimeSide/examples/sandbox/manage.py migrate --noinput RUN /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput EXPOSE 8000 -#CMD ["supervisord", "-n"] diff --git a/docker-compose.yml b/docker-compose.yml index 22fc693..5067dfe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ -media: +home: image: debian:wheezy volumes: - - ./examples/sandbox/media:/media + - ./examples/sandbox:/home/timeside command: /bin/true static: @@ -34,10 +34,10 @@ nginx: ports: - "8000:80" volumes: - - ./examples/deploy/nginx/sites-enabled/app.conf:/etc/nginx/conf.d/default.conf + - ./examples/deploy/nginx-app.conf:/etc/nginx/conf.d/default.conf volumes_from: - static - - media + - home - log links: - app @@ -48,7 +48,7 @@ app: - .:/opt/TimeSide volumes_from: - static - - media + - home - log command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh ports: diff --git a/examples/deploy/nginx/sites-enabled/app.conf b/examples/deploy/nginx-app.conf similarity index 86% rename from examples/deploy/nginx/sites-enabled/app.conf rename to examples/deploy/nginx-app.conf index 1ef52b3..6d495f3 100644 --- a/examples/deploy/nginx/sites-enabled/app.conf +++ b/examples/deploy/nginx-app.conf @@ -13,7 +13,7 @@ server { # Django media location /media { - alias /media; # your Django project's media files - amend as required + alias /home/timeside/media; # your Django project's media files - amend as required autoindex on; } # Django static diff --git a/examples/deploy/start_app.sh b/examples/deploy/start_app.sh index 10db902..d5c674d 100644 --- a/examples/deploy/start_app.sh +++ b/examples/deploy/start_app.sh @@ -2,7 +2,7 @@ # paths app_dir='/opt/TimeSide/' -sandbox_dir=$app_dir'examples/sandbox/' +sandbox_dir='/home/timeside/' manage=$sandbox_dir'manage.py' wsgi=$sandbox_dir'wsgi.py' app_static_dir=$app_dir'timeside/player/static/' -- 2.39.5