Skip to content

Commit

Permalink
edit docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
metantesan committed Oct 31, 2024
1 parent 9d2ec2a commit 47713f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ RUN pip install -r requirments.txt

RUN pip install gunicorn
# Copy the application code
COPY src/* .

COPY src/ .
# Expose the port for Gunicorn
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"]
ENTRYPOINT [ "./docker-entrypoint.sh" ]
ENTRYPOINT [ "sh","/app/docker-entrypoint.sh" ]
2 changes: 1 addition & 1 deletion src/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/sh
#!ash
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 47713f8

Please sign in to comment.