This commit is contained in:
parent
d9924e13e8
commit
5cef411aff
@ -16,5 +16,6 @@ EXPOSE 8080
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./manage.py ./
|
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
13
docker-entrypoint.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user