]> git.parisson.com Git - timeside.git/commitdiff
better doc for sqlite and mysql
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Mar 2015 21:50:23 +0000 (22:50 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Mar 2015 21:50:23 +0000 (22:50 +0100)
docker-compose-mysql.yml
examples/sandbox/settings.py

index 4e01fdd6358e76bffa6f17f39be35c29c86a3f3e..9f11f79d00e76d2f169b42fedc7affc8773f17fc 100644 (file)
@@ -68,6 +68,15 @@ rabbitmq:
   expose:
     - "5672"
 
+worker:
+  build: .
+  volumes_from:
+    - home
+  command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh
+  links:
+    - rabbitmq
+    - db
+
 app:
   build: .
   volumes:
@@ -84,15 +93,7 @@ app:
   links:
     - rabbitmq
     - db
-
-worker:
-  build: .
-  volumes_from:
-    - home
-  command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh
-  links:
-    - rabbitmq
-    - db
+    - worker
 
 nginx:
   image: nginx
index f08af1900e2f610a456adeb6e0b1be9aebdc78e3..e3f784c71d8dfb4b5aa69a5b2cba703fa7e8ba2c 100644 (file)
@@ -16,16 +16,20 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.mysql',  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+        # SQLite config
+        # 'ENGINE': 'django.db.backends.sqlite',  # 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.
+        # 'OPTIONS': {
+        #     'timeout': 60,
+        # }
+
+        # MySQL config
+        'ENGINE': 'django.db.backends.mysql',  # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
         'USER': 'root',      # Not used with sqlite3.
         'PASSWORD': 'mysecretpassword',  # Not used with sqlite3.
+        'NAME': 'timeside',
         'HOST': 'db',      # Set to empty string for localhost. Not used with sqlite3.
         'PORT': '3306',      # Set to empty string for default. Not used with sqlite3.
-        # 'OPTIONS': {
-        #     'timeout': 60,
-        # }
     }
 }
 
@@ -175,10 +179,10 @@ LOGGING = {
 REST_FRAMEWORK = {
 }
 
-# One or more gearman servers
-# GEARMAN_SERVERS = ['127.0.0.1']
 
+# replace rabbitmq by localhost if you start your app outside docker-compose
 BROKER_URL = 'amqp://guest:guest@rabbitmq//'
+
 CELERY_IMPORTS = ("timeside.server.tasks",)
 CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend'
 CELERY_TASK_SERIALIZER = "json"