]> git.parisson.com Git - timeside.git/commitdiff
remove django init in Dockerfile, fix mysql start and worker sync
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Mar 2015 21:17:42 +0000 (22:17 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Mar 2015 21:17:42 +0000 (22:17 +0100)
Dockerfile
docker-compose-mysql.yml
examples/deploy/celery_app.sh
examples/sandbox/settings.py

index d4fd4556be46f71e2443ec6e046fc5fee633d4f1..9b76fd8920a4f5b0e3481ec35bd10822688d535d 100644 (file)
@@ -69,8 +69,8 @@ RUN pip install -r requirements.txt
 #RUN cd /opt/TimeSide; python setup.py develop
 
 # Sandbox setup
-RUN /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput && \
-    /opt/TimeSide/examples/sandbox/manage.py migrate --noinput && \
-    /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
+RUN /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput && \
+    /opt/TimeSide/examples/sandbox/manage.py migrate --noinput && \
+    /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
 
 EXPOSE 8000
index 816f7e5d1da6220b0c5ac2902b277abc86e55397..4e01fdd6358e76bffa6f17f39be35c29c86a3f3e 100644 (file)
@@ -58,8 +58,8 @@ db:
   environment:
     - MYSQL_ROOT_PASSWORD=mysecretpassword
     - MYSQL_DATABASE=timeside
-    - MYSQL_USER=timeside
-    - MYSQL_PASSWORD=changeme
+    - MYSQL_USER=root
+    - MYSQL_PASSWORD=mysecretpassword
 
 rabbitmq:
   image: rabbitmq:3-management
@@ -92,7 +92,6 @@ worker:
   command: /bin/sh /opt/TimeSide/examples/deploy/celery_app.sh
   links:
     - rabbitmq
-    - app
     - db
 
 nginx:
index 39f14964c3dba82a103eab6af841ea079dead026..c09ad06e4fc32a51cba2b9c3b7b35eccab33ff33 100644 (file)
@@ -5,7 +5,10 @@ app_dir='/opt/TimeSide/'
 sandbox_dir='/home/timeside/'
 manage=$sandbox_dir'manage.py'
 
+python $manage syncdb --noinput
 python $manage migrate --noinput
+python $manage collectstatic --noinput
+python $manage timeside-create-admin-user
 
 # Starting celery worker with the --autoreload option will enable the worker to watch for file system changes
 # This is an experimental feature intended for use in development only
index 2d96783f4ac67201878e2bf29a5fd6093ffe0480..f08af1900e2f610a456adeb6e0b1be9aebdc78e3 100644 (file)
@@ -19,10 +19,10 @@ DATABASES = {
         '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.
+        'USER': 'root',      # Not used with sqlite3.
+        'PASSWORD': 'mysecretpassword',  # Not used with sqlite3.
+        '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,
         # }