From 65458e4a42f75814add0d69a82384cf2764b0f13 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Tue, 3 Mar 2015 14:59:06 +0100 Subject: [PATCH] Docker-compose: add a script to manage app launch command --- docker-compose.yml | 3 +-- examples/deploy/start_app.sh | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 examples/deploy/start_app.sh diff --git a/docker-compose.yml b/docker-compose.yml index 5eef9e4..338668f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 index 0000000..1b243db --- /dev/null +++ b/examples/deploy/start_app.sh @@ -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 -- 2.39.5