--- /dev/null
+# Copyright 2013 Thatcher Peskens
+# Copyright 2014 Guillaume Pellerin
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from debian:stable
+
+maintainer Guillaume Pellerin <yomguy@parisson.com>
+
+add ./deploy/apt-app.list /etc/apt/sources.list.d/
+run apt-get update
+run apt-get install -y build-essential vim
+run apt-get install -y python python-dev python-pip
+run apt-get -y -t wheezy-backports dist-upgrade
+run apt-get install -y --force-yes -t wheezy-backports nginx supervisor python-timeside git python-tables python-django python-traits python-networkx
+run apt-get clean
+
+# install uwsgi now because it takes a little while
+run pip install uwsgi
+
+# clone app
+add . /opt/TimeSide
+
+# setup all the configfiles
+run echo "daemon off;" >> /etc/nginx/nginx.conf
+run rm /etc/nginx/sites-enabled/default
+run ln -s /opt/TimeSide/deploy/nginx-app.conf /etc/nginx/sites-enabled/
+run ln -s /opt/TimeSide/deploy/supervisor-app.conf /etc/supervisor/conf.d/
+
+# run pip install
+run pip install -e /opt/TimeSide
+
+# sandbox setup
+run /opt/TimeSide/timeside/server/sandbox/manage.py syncdb --noinput
+run /opt/TimeSide/timeside/server/sandbox/manage.py migrate --noinput
+run /opt/TimeSide/timeside/server/sandbox/manage.py collectstatic --noinput
+
+expose 80
+cmd ["supervisord", "-n"]
Then browse http://localhost:9000/api/
-To start a development process, it is advised to checkout the dev branch::
+To start a new development, it is advised to checkout the dev branch and build your own container::
- cd /root/apps/TimeSide
+ cd TimeSide
git checkout dev
+ sudo docker build .
Sponsors and Partners
--- /dev/null
+deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free
+deb-src http://ftp.debian.org/debian/ wheezy-backports main contrib non-free
+
+deb http://security.debian.org/ wheezy/updates main
+deb-src http://security.debian.org/ wheezy/updates main
+
+deb http://debian.parisson.com/debian/ wheezy main
+deb-src http://debian.parisson.com/debian wheezy main
+
+deb ftp://ftp.igh.cnrs.fr/pub/debian-multimedia stable main
\ No newline at end of file
--- /dev/null
+# mysite_nginx.conf
+
+# the upstream component nginx needs to connect to
+upstream django {
+ server unix:/opt/TimeSide/timeside/server/sandbox/app.sock; # for a file socket
+ # server 127.0.0.1:8001; # for a web port socket (we'll use this first)
+ }
+
+# configuration of the server
+server {
+ # the port your site will be served on, default_server indicates that this server block
+ # is the block to use if no blocks match the server_name
+ listen 80 default_server;
+
+ # the domain name it will serve for
+ server_name .example.com; # substitute your machine's IP address or FQDN
+ charset utf-8;
+
+ # max upload size
+ client_max_body_size 75M; # adjust to taste
+
+ # Django media
+ location /media {
+ alias /opt/TimeSide/timeside/server/sandbox/media; # your Django project's media files - amend as required
+ }
+
+ # Uncomment in production!
+ location /static {
+ alias /var/www/static; # your Django project's static files - amend as required
+ }
+
+ # Finally, send all non-media requests to the Django server.
+ location / {
+ uwsgi_pass django;
+ include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
+ }
+ }
--- /dev/null
+[program:app-uwsgi]
+command = /usr/local/bin/uwsgi --ini /opt/TimeSide/timeside/server/sandbox/uwsgi.ini
+
+[program:nginx-app]
+command = /usr/sbin/nginx
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
-MEDIA_URL = ''
+MEDIA_URL = '/media/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = ''
+STATIC_ROOT = '/var/www/static'
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
--- /dev/null
+[uwsgi]
+# this config will be loaded if nothing specific is specified
+# load base config from below
+ini = :base
+
+# %d is the dir this configuration file is in
+socket = %dapp.sock
+master = true
+processes = 4
+
+[dev]
+ini = :base
+# socket (uwsgi) is not the same as http, nor http-socket
+socket = :8001
+
+
+[local]
+ini = :base
+http = :8000
+# set the virtual env to use
+home=/home/me/.virtualenv
+
+
+[base]
+# chdir to the folder of this config file, plus app/website
+chdir = %d
+# load the module from wsgi.py, it is a python path from
+# the directory above.
+module=wsgi
+# allow anyone to connect to the socket. This is very permissive
+chmod-socket=666
"""
import os
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sandbox.settings")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION