]> git.parisson.com Git - timeside.git/commitdiff
Docker-compose: add a script to manage app launch command
authorThomas Fillon <thomas@parisson.com>
Tue, 3 Mar 2015 13:59:06 +0000 (14:59 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 3 Mar 2015 13:59:06 +0000 (14:59 +0100)
docker-compose.yml
examples/deploy/start_app.sh [new file with mode: 0644]

index 5eef9e462a6db0d7d8d9264653f00494038594e7..338668f610077457fea9da2a07b27382d93f7d10 100644 (file)
@@ -51,7 +51,6 @@ app:
   volumes_from:
     - datastatic
     - datamedia
-  command: /opt/TimeSide/examples/sandbox/manage.py collectstatic
-  command: uwsgi --socket :8000 --wsgi-file /opt/TimeSide/examples/sandbox/wsgi.py  --chdir /opt/TimeSide/examples/sandbox/ --master --processes 4 --threads 2
+  command: /bin/sh /opt/TimeSide/examples/deploy/start_app.sh
   expose:
     - "80" #default runserver wsgi port
\ No newline at end of file
diff --git a/examples/deploy/start_app.sh b/examples/deploy/start_app.sh
new file mode 100644 (file)
index 0000000..1b243db
--- /dev/null
@@ -0,0 +1,5 @@
+python /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput
+python /opt/TimeSide/examples/sandbox/manage.py migrate --noinput
+python /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput
+
+uwsgi --socket :8000 --wsgi-file /opt/TimeSide/examples/sandbox/wsgi.py  --chdir /opt/TimeSide/examples/sandbox/ --master --processes 4 --threads 2
\ No newline at end of file