File tree Expand file tree Collapse file tree 8 files changed +48
-38
lines changed
frameworks/Python/aiohttp Expand file tree Collapse file tree 8 files changed +48
-38
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ This will switch which database engine the app uses to execute queries with test
3535
3636### Server
3737
38- gunicorn +uvloop on CPython
38+ nginx +uvloop on CPython
3939
4040## Test URLs
4141
Original file line number Diff line number Diff line change 1+ FROM python:3.13
2+
3+ ADD ./ /aiohttp
4+
5+ WORKDIR aiohttp
6+
7+ RUN pip3 install cython==3.0.11 && \
8+ pip3 install -r /aiohttp/requirements.txt
9+
10+ ENV CONNECTION=RAW
11+
12+ EXPOSE 8080
13+
14+ CMD python3 -O -m gunicorn app.gunicorn:app -c gunicorn_conf.py
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11FROM python:3.13
22
3- ADD ./ /aiohttp
3+ RUN apt-get update && apt-get install -y nginx
44
5- WORKDIR aiohttp
5+ ADD ./requirements.txt / aiohttp/requirements.txt
66
77RUN pip3 install cython==3.0.11 && \
88 pip3 install -r /aiohttp/requirements.txt
99
10+ ADD ./ /aiohttp
11+
12+ WORKDIR /aiohttp
13+
14+ ENV CONNECTION=ORM
15+
1016EXPOSE 8080
1117
12- CMD python3 -O -m gunicorn app.gunicorn:app -c gunicorn_conf.py
18+ RUN chmod +x /aiohttp/nginx-entrypoint.sh
19+
20+ ENTRYPOINT ["/aiohttp/nginx-entrypoint.sh" ]
21+
22+
Original file line number Diff line number Diff line change 11FROM python:3.13
22
3- ADD ./ /aiohttp
3+ RUN apt-get update && apt-get install -y nginx
44
5- WORKDIR aiohttp
5+ ADD ./requirements.txt / aiohttp/requirements.txt
66
77RUN pip3 install cython==3.0.11 && \
88 pip3 install -r /aiohttp/requirements.txt
99
10+ ADD ./ /aiohttp
11+
12+ WORKDIR /aiohttp
13+
1014ENV CONNECTION=RAW
1115
1216EXPOSE 8080
1317
14- CMD python3 -O -m gunicorn app.gunicorn:app -c gunicorn_conf.py
18+ RUN chmod +x /aiohttp/nginx-entrypoint.sh
19+
20+ ENTRYPOINT ["/aiohttp/nginx-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1717 "flavor" : " Python3" ,
1818 "orm" : " Raw" ,
1919 "platform" : " asyncio" ,
20- "webserver" : " gunicorn " ,
20+ "webserver" : " nginx " ,
2121 "os" : " Linux" ,
2222 "database_os" : " Linux" ,
2323 "display_name" : " aiohttp" ,
2424 "notes" : " uses asyncpg for database access"
2525 },
26- "nginx " : {
26+ "gunicorn " : {
2727 "json_url" : " /json" ,
2828 "db_url" : " /db" ,
2929 "query_url" : " /queries/" ,
4242 "webserver" : " nginx" ,
4343 "os" : " Linux" ,
4444 "database_os" : " Linux" ,
45- "display_name" : " aiohttp-nginx " ,
46- "notes" : " uses nginx as proxy server" ,
45+ "display_name" : " aiohttp-gunicorn " ,
46+ "notes" : " uses gunicorn as proxy server" ,
4747 "versus" : " default"
4848 },
4949 "orm" : {
6060 "flavor" : " Python3" ,
6161 "orm" : " Full" ,
6262 "platform" : " asyncio" ,
63- "webserver" : " gunicorn " ,
63+ "webserver" : " nginx " ,
6464 "os" : " Linux" ,
6565 "database_os" : " Linux" ,
6666 "display_name" : " aiohttp-orm" ,
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ database_os = "Linux"
1515os = " Linux"
1616orm = " Raw"
1717platform = " asyncio"
18- webserver = " gunicorn "
18+ webserver = " nginx "
1919versus = " None"
2020
21- [nginx ]
21+ [gunicorn ]
2222urls.plaintext = " /plaintext"
2323urls.json = " /json"
2424urls.db = " /db"
@@ -32,8 +32,8 @@ database_os = "Linux"
3232os = " Linux"
3333orm = " Raw"
3434platform = " asyncio"
35- webserver = " nginx "
36- versus = " None "
35+ webserver = " gunicorn "
36+ versus = " default "
3737
3838[orm ]
3939urls.db = " /db"
@@ -47,5 +47,5 @@ database_os = "Linux"
4747os = " Linux"
4848orm = " Full"
4949platform = " asyncio"
50- webserver = " gunicorn "
50+ webserver = " nginx "
5151versus = " default"
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ for i in $(seq 0 $((CORES-1))); do
1414 SOCKET=" /run/aiohttp-$i .sock"
1515 until [ -S " $SOCKET " ]; do
1616 echo " Waiting for socket $SOCKET ..."
17- sleep 0.1
17+ sleep 0.2
1818 done
1919 chown root:www-data " $SOCKET "
2020 chmod 660 " $SOCKET "
You can’t perform that action at this time.
0 commit comments