]> git.parisson.com Git - timeside.git/commitdiff
init first mysql db container
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Mar 2015 09:22:30 +0000 (10:22 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 17 Mar 2015 09:22:30 +0000 (10:22 +0100)
Dockerfile
conda-requirements.txt
docker-compose.yml
examples/deploy/start_app.sh
examples/sandbox/settings.py
setup.py

index bf0bc402461b3901a278b3da76035ed8a06373b6..ff9af7f6d08a54777517fab10625b2b39930ea72 100644 (file)
@@ -23,7 +23,7 @@ RUN apt-key adv --keyserver pgp.mit.edu --recv-key E3298399DF14BB7C && \
     apt-key adv --keyserver pgp.mit.edu --recv-key 5C808C2B65558117
 ADD ./examples/deploy/apt-app.list /etc/apt/sources.list.d/
 RUN apt-get update && \
-    apt-get install -y --force-yes python-gst0.10 gstreamer0.10-plugins-good gstreamer0.10-gnonlin gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-alsa vamp-examples
+    apt-get install -y --force-yes python-gst0.10 gstreamer0.10-plugins-good gstreamer0.10-gnonlin gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad gstreamer0.10-alsa vamp-examples libmysqlclient-dev
 RUN apt-get -y --force-yes -t wheezy-backports dist-upgrade
 RUN apt-get install -y --force-yes -t wheezy-backports  python-aubio python-yaafe
 #RUN apt-get install -y --force-yes -t wheezy-backports build-essential vim python python-dev python-pip nginx postgresql python-psycopg2 supervisor git
index f31b24d22874b81eec8622761db2bdd471d0da9b..b2f33a393b205ba11cd49916c9986c8759f44405 100644 (file)
@@ -13,3 +13,4 @@ requests=2.5.1=py27_0
 scipy=0.14.0=np19py27_0
 setuptools=12.2=py27_0
 traits=4.4.0=py27_0
+mysql-python=1.2.5=py27_0
\ No newline at end of file
index 3755115c9348c937a87131db017c1c6db7bad6e5..3a18cf27afb5848c4a0089a86de0b6970c18a5f4 100644 (file)
@@ -27,11 +27,16 @@ lib:
   command: /bin/true
 
 
-# db:
-#   image: postgres
-#   volumes_from:
-#     - datadb
-
+db:
+  image: mysql
+  volumes_from:
+    - lib
+    - log
+  environment:
+    - MYSQL_ROOT_PASSWORD=mysecretpassword
+    - MYSQL_DATABASE=timeside
+    - MYSQL_USER=timeside
+    - MYSQL_PASSWORD=changeme
 rabbitmq:
   image: rabbitmq:3-management
   ports:
@@ -54,6 +59,7 @@ app:
     - "8000" #default runserver wsgi port
   links:
     - rabbitmq
+    - db
 
 worker:
   build: .
index 0f7fe78a4c2a58bf5a4d3d3c7797bb20e101ec22..cf843472732e034b1376239ca5888d1708b84f88 100644 (file)
@@ -9,7 +9,10 @@ app_static_dir=$app_dir'timeside/player/static/'
 
 # Copy Sandbox in /home/timeside
 #  this is not needed for TimeSide but for Timeside-diadems
-cp -uR /opt/TimeSide/examples/sandbox/* /home/timeside/
+# cp -uR /opt/TimeSide/examples/sandbox/* /home/timeside/
+
+# install staging modules
+pip install mysql
 
 # django init
 python $manage syncdb --noinput
index 56f59ceef0147da8dba9d89aaac61c425bb447cb..2d96783f4ac67201878e2bf29a5fd6093ffe0480 100644 (file)
@@ -16,15 +16,16 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3',  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': os.path.join(PROJECT_ROOT, 'timeside.sql'),  # Or path to database file if using sqlite3.
-        'USER': '',      # Not used with sqlite3.
-        'PASSWORD': '',  # Not used with sqlite3.
+        'ENGINE': 'django.db.backends.mysql',  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+        # 'NAME': os.path.join(PROJECT_ROOT, 'timeside.sql'),  # Or path to database file if using sqlite3.
+        'NAME': 'timeside',  # Or path to database file if using sqlite3.
+        'USER': 'timeside',      # Not used with sqlite3.
+        'PASSWORD': 'changeme',  # Not used with sqlite3.
         'HOST': '',      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '',      # Set to empty string for default. Not used with sqlite3.
-        'OPTIONS': {
-            'timeout': 60,
-        }
+        'OPTIONS': {
+            'timeout': 60,
+        }
     }
 }
 
index 4847c79fc0112e6d75b67a4f253b2b4fb7ddc0ac..3f92f9dc7926d4770fff6ff77ec7146fbdb9fceb 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -63,6 +63,7 @@ setup(
         'networkx',
         'django-celery',
         'watchdog',
+        'mysqldb',
         ],
     platforms=['OS Independent'],
     license='Gnu Public License V2',