Perform automatic database migration

master
Pierre Jaury 9 years ago
parent 81c33fce8a
commit cc013560d9

@ -4,9 +4,10 @@ RUN mkdir -p /app
WORKDIR /app WORKDIR /app
COPY freeposte ./freeposte COPY freeposte ./freeposte
COPY initdb.py . COPY manage.py .
COPY requirements.txt . COPY requirements.txt .
COPY start.sh /start.sh
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
CMD gunicorn -w 4 -b 0.0.0.0:80 --access-logfile - --error-logfile - freeposte:app CMD ["/start.sh"]

@ -0,0 +1,4 @@
#!/bin/sh
python manage.py db upgrade
gunicorn -w 4 -b 0.0.0.0:80 --access-logfile - --error-logfile - freeposte:app
Loading…
Cancel
Save