]> git.parisson.com Git - timeside.git/commitdiff
Docker-compose : add Uswgi
authorThomas Fillon <thomas@parisson.com>
Sat, 28 Feb 2015 15:06:54 +0000 (16:06 +0100)
committerThomas Fillon <thomas@parisson.com>
Sat, 28 Feb 2015 15:06:54 +0000 (16:06 +0100)
Dockerfile
docker-compose.yml

index 3b1241483c22c237c03baad32fc44807b1454ce7..2d6f50764b0ba411f069d2d94a91d560c52af860 100644 (file)
@@ -29,7 +29,7 @@ RUN apt-get install -y --force-yes -t wheezy-backports  python-aubio python-yaaf
 #RUN apt-get install -y --force-yes -t wheezy-backports build-essential vim python python-dev python-pip nginx postgresql python-psycopg2 supervisor git
 RUN apt-get clean
 
-RUN apt-get update && apt-get install -y wget bzip2
+RUN apt-get update && apt-get install -y wget bzip2 build-essential
 
 # Install conda in /opt/miniconda
 RUN wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh && \
@@ -39,16 +39,16 @@ ENV PATH /opt/miniconda/bin:$PATH
 RUN hash -r && \ 
     conda config --set always_yes yes --set changeps1 yes && \
     conda update -q conda
-# install tools via pip
-#RUN pip install uwsgi ipython
 
+# Install uwsgi
+RUN conda install pip && \
+    pip install uwsgi
 
 RUN mkdir /opt/TimeSide
 WORKDIR /opt/TimeSide
 
 
 # Install binary dependencies with conda
-#RUN export deps="setuptools pip coverage matplotlib h5py pytables pandas>=0.15.1 networkx nltk>=3.0 scikit-learn numexpr"
 ADD conda-requirements.txt /opt/TimeSide/
 ADD requirements.txt /opt/TimeSide/
 RUN conda install --file conda-requirements.txt  && \
@@ -60,12 +60,11 @@ RUN conda install -c thomasfillon aubio
 # Link Yaafe in site-packages 
 RUN ln -s /usr/lib/python2.7/dist-packages/yaafelib /opt/miniconda/lib/python2.7
 
-# clone app
+# Clone app
 ADD . /opt/TimeSide
 WORKDIR /opt/TimeSide
 
 RUN pip install -r requirements.txt
-RUN conda list
 
 # setup all the configfiles  --> GĂ©rer dans le container Nginx
 #RUN echo "daemon off;" >> /etc/nginx/nginx.conf
@@ -79,10 +78,10 @@ RUN conda list
 # add dev repo path
 #RUN cd /opt/TimeSide; python setup.py develop
 
-# sandbox setup
-#RUN /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput
-#RUN /opt/TimeSide/examples/sandbox/manage.py migrate --noinput
-#RUN /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
+# Sandbox setup
+RUN /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput
+RUN /opt/TimeSide/examples/sandbox/manage.py migrate --noinput
+RUN /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
 
 #EXPOSE 80
 #CMD ["supervisord", "-n"]
index 31c661494ee0c29b398020e6f6fe6d88c580d361..c14ec42474e7b70ec9fc213724827c915d0206a8 100644 (file)
@@ -14,8 +14,8 @@ nginx:
     - "8080:80"
   volumes:
     - ./examples/deploy/nginx-app.conf:/etc/nginx/sites-enabled/
-    #  --> media
-    #  --> static
+    - /var/www/static
+    - /media
   links:
     - app
 
@@ -23,9 +23,7 @@ app:
   build: .
   volumes:
     - .:/opt/TimeSide
-  command:
-    - /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput
-    - /opt/TimeSide/examples/sandbox/manage.py migrate --noinput
-    - /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
+  command: uwsgi --ini /opt/TimeSide/examples/sandbox/uwsgi.ini
   ports:
     - "8000:8000"