add docker-entrypoint
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2020-12-29 22:20:14 +01:00
parent d9924e13e8
commit 5cef411aff
2 changed files with 15 additions and 1 deletions

View File

@ -16,5 +16,6 @@ EXPOSE 8080
WORKDIR /app
COPY ./manage.py ./
COPY ./docker-entrypoint.sh ./
ENTRYPOINT ["gunicorn", "-b", "0.0.0.0:8080", "--workers", "4", "--threads", "4", "geogame.wsgi:application"]
ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"]

13
docker-entrypoint.sh Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Collect static files
echo "Collect static files"
python manage.py collectstatic --noinput
# Apply database migrations
echo "Apply database migrations"
python manage.py migrate
# Start server
echo "Starting server"
gunicorn -b 0.0.0.0:8080 --workers 4 --threads 4 geogame.wsgi:application