diff --git a/Dockerfile b/Dockerfile index f5c51881..daaab412 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,7 @@ RUN apk update --no-cache && \ USER 1001 -CMD ["sh", "-c", "wait4ports -s 15 tcp://${DJANGO_DATABASE_HOST:db}:${DJANGO_DATABASE_PORT:5432}; ./cmd.sh --autoreload --static"] +CMD ["sh", "-c", "wait4ports -s 15 tcp://${DJANGO_DATABASE_HOST:db}:${DJANGO_DATABASE_PORT:5432}; manage.py migrate --no-input && ./cmd.sh --autoreload --static"] FROM base as prod diff --git a/cmd.sh b/cmd.sh index 109462ef..fded3423 100755 --- a/cmd.sh +++ b/cmd.sh @@ -8,5 +8,4 @@ manage.py collectstatic --noinput set -e -manage.py migrate --no-input manage.py serve --static --port 8080 --req-queue-len "${HURRICANE_REQ_QUEUE_LEN:-250}" "$@" \ No newline at end of file