# 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
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
RUN /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
EXPOSE 8000
-#CMD ["supervisord", "-n"]
-media:
+home:
image: debian:wheezy
volumes:
- - ./examples/sandbox/media:/media
+ - ./examples/sandbox:/home/timeside
command: /bin/true
static:
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
- .:/opt/TimeSide
volumes_from:
- static
- - media
+ - home
- log
command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh
ports:
--- /dev/null
+server_tokens off;
+
+server {
+ listen 80;
+ server_name nginx;
+ charset utf-8;
+
+ access_log /var/log/nginx/app-access.log;
+ error_log /var/log/nginx/app-error.log;
+
+ # max upload size
+ client_max_body_size 75M; # adjust to taste
+
+ # Django media
+ location /media {
+ alias /home/timeside/media; # your Django project's media files - amend as required
+ autoindex on;
+ }
+ # Django static
+ location /static {
+ alias /var/www/static; # your Django project's static files - amend as required
+ autoindex on;
+ }
+
+ location / {
+ uwsgi_pass app:8000;
+ include /etc/nginx/uwsgi_params;
+ }
+}
+
+++ /dev/null
-server_tokens off;
-
-server {
- listen 80;
- server_name nginx;
- charset utf-8;
-
- access_log /var/log/nginx/app-access.log;
- error_log /var/log/nginx/app-error.log;
-
- # max upload size
- client_max_body_size 75M; # adjust to taste
-
- # Django media
- location /media {
- alias /media; # your Django project's media files - amend as required
- autoindex on;
- }
- # Django static
- location /static {
- alias /var/www/static; # your Django project's static files - amend as required
- autoindex on;
- }
-
- location / {
- uwsgi_pass app:8000;
- include /etc/nginx/uwsgi_params;
- }
-}
-
# 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/'