Skip to content

Commit

Permalink
add docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
metantesan committed Oct 31, 2024
1 parent 68fd9aa commit ecb7920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ COPY src/* .
EXPOSE 8000

# Run migrations and then start Gunicorn
CMD ["sh", "-c", "python manage.py migrate && gunicorn --workers=3 --bind=0.0.0.0:8000 core.wsgi:application"]
# CMD ["sh", "-c", "python manage.py migrate && gunicorn --workers=3 --bind=0.0.0.0:8000 core.wsgi:application"]
ENTRYPOINT [ "docker-entrypoint.sh" ]
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python manage.py collectstatic --noinput
python manage.py migrate
gunicorn --workers=3 --bind=0.0.0.0:8000 core.wsgi:application

0 comments on commit ecb7920

Please sign in to comment.