Changed start.sh to start.py

This commit is contained in:
Ionut Filip
2018-10-22 18:01:59 +03:00
parent eb7dfb5771
commit 0e5606d493
6 changed files with 23 additions and 19 deletions

View File

@@ -12,11 +12,11 @@ RUN apk add --no-cache openssl \
COPY mailu ./mailu
COPY migrations ./migrations
COPY manage.py .
COPY start.sh /start.sh
COPY start.py /start.py
RUN pybabel compile -d mailu/translations
EXPOSE 80/tcp
VOLUME ["/data"]
CMD ["/start.sh"]
CMD python /start.py

7
core/admin/start.py Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/python3
import os
os.system("python manage.py advertise")
os.system("python manage.py db upgrade")
os.system("gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload mailu:app")

View File

@@ -1,5 +0,0 @@
#!/bin/sh
python manage.py advertise
python manage.py db upgrade
gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload mailu:app