From: Guillaume Pellerin Date: Fri, 7 Nov 2014 00:01:21 +0000 (+0100) Subject: fix syncdb with postgres X-Git-Tag: 0.7^2~51 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2ba7e591300decf40f51efc6ebdc8c37690e9925;p=timeside.git fix syncdb with postgres --- diff --git a/Dockerfile b/Dockerfile index 4f5bc11..22f7c31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ run pip install uwsgi ipython add . /opt/TimeSide # setup postgresql DB +volume ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"] user postgres run /etc/init.d/postgresql start &&\ psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\ @@ -53,10 +54,9 @@ run pip install -e /opt/TimeSide run echo "export PYTHONPATH=$PYTHONPATH:/opt/Timeside" >> ~/.bashrc # sandbox setup -run /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput -run /opt/TimeSide/examples/sandbox/manage.py migrate --noinput +run /etc/init.d/postgresql start && /opt/TimeSide/examples/sandbox/manage.py syncdb --noinput +run /etc/init.d/postgresql start && /opt/TimeSide/examples/sandbox/manage.py migrate --noinput run /opt/TimeSide/examples/sandbox/manage.py collectstatic --noinput -volume ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"] expose 80 cmd ["supervisord", "-n"]