Skip to content

Commit

Permalink
add gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
rs77 committed Jun 17, 2024
1 parent 42cb6b9 commit ed6c79b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ RUN python -m venv /py && \
/py/bin/pip install --upgrade pip && \
/py/bin/pip install -r /requirements.txt

ENV PATH="/py/bin:$PATH"
COPY ./scripts /scripts
RUN chmod -R +x /scripts

ENV PATH="/scripts:/py/bin:$PATH"

COPY ./app /app
WORKDIR /app

EXPOSE 80
CMD ["/scripts/run.sh"]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Django==5.0.6
psycopg2==2.9.9
gunicorn==22.0.0
4 changes: 4 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -e

gunicorn -b :80 --chdir /app app.wsgi:application

0 comments on commit ed6c79b

Please sign in to comment.