diff --git a/admin/Dockerfile b/admin/Dockerfile index 6193aa18..502df9b7 100644 --- a/admin/Dockerfile +++ b/admin/Dockerfile @@ -4,9 +4,10 @@ RUN mkdir -p /app WORKDIR /app COPY freeposte ./freeposte -COPY initdb.py . +COPY manage.py . COPY requirements.txt . +COPY start.sh /start.sh 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"] diff --git a/admin/start.sh b/admin/start.sh new file mode 100755 index 00000000..58cc1f5a --- /dev/null +++ b/admin/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