Skip to content

Commit

Permalink
Merge pull request #232 from EarthSchlange/change_from_uwsgi
Browse files Browse the repository at this point in the history
Move the uwsgi server to Gunicorn Server
  • Loading branch information
Michael Hiiva committed Oct 17, 2021
2 parents e898aec + 6f74816 commit 774d41a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
build: ./
restart: always
ports:
- "8000:3031"
- "8000:8000"
environment:
DB_HOST: db
DB_PORT: 3306
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ django-extensions==3.1.3
jinja2==2.11.3
PyMySQL==1.0.2
yolk==0.4.3
uwsgi==2.0.20
gunicorn==20.1.0
15 changes: 2 additions & 13 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,10 @@ 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 \
--processes 2
python manage.py runserver 0.0.0.0:8000
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
--enable-threads \
--processes 2
gunicorn -b 0.0.0.0:8000 agagd.wsgi
fi
}

Expand Down

0 comments on commit 774d41a

Please sign in to comment.