Perform automatic database migration
This commit is contained in:
@@ -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"]
|
||||||
|
|||||||
4
admin/start.sh
Executable file
4
admin/start.sh
Executable file
@@ -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
|
||||||
Reference in New Issue
Block a user