Skip to content

Commit

Permalink
Merge pull request #230 from EarthSchlange/add_fix_for_uwsgi
Browse files Browse the repository at this point in the history
add fix for uwsgi
  • Loading branch information
Michael Hiiva committed Oct 12, 2021
2 parents 1f34b5f + b607ecb commit c20423a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get update && apt-get install -y \
RUN pip install --no-cache-dir -U pip

COPY requirements.txt /build/
RUN pip install --user --no-cache-dir -r requirements.txt && pip install --user --no-cache-dir uwsgi
RUN pip install --user --no-cache-dir -r requirements.txt

### Final image
FROM python:3.9-slim-buster
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ django-extensions==3.1.3
jinja2==2.11.3
PyMySQL==1.0.2
yolk==0.4.3
uwsgi==2.0.20
18 changes: 13 additions & 5 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,21 @@ function start_server() {

if [ $r_flag == 0 ];
then
uwsgi --http-socket 0.0.0.0:3031 --module agagd.wsgi \
--static-map /static=/tmp/static/ --static-map /media=/srv/media \
--enable-threads --python-autoreload 1
uwsgi --http-socket 0.0.0.0:3031 \
--module agagd.wsgi \
--static-map /static=/tmp/static/ \
--static-map /media=/srv/media \
--enable-threads \
--python-autoreload 1 \
--processes 2
elif [ $r_flag == 1 ];
then
uwsgi --http-socket 0.0.0.0:3031 --module agagd.wsgi \
--static-map /static=/tmp/static/ --static-map /media=/srv/media
uwsgi --http-socket 0.0.0.0:3031 \
--module agagd.wsgi \
--static-map /static=/tmp/static/ \
--static-map /media=/srv/media
--enable-threads \
--processes 2
fi
}

Expand Down

0 comments on commit c20423a

Please sign in to comment.