File tree 4 files changed +10
-9
lines changed
4 files changed +10
-9
lines changed Original file line number Diff line number Diff line change
1
+ NGINX_PORT = 8004
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ services:
9
9
volumes :
10
10
- ./flask/app:/usr/src/app
11
11
networks :
12
- - net_return_http_status_code
12
+ - internal
13
13
# -w 2 -> リクエストをさばくWorkerプロセスの数
14
14
# -b 0.0.0.0:8000 app:app -> appを自身の8000ポートと結合する(Flaskアプリへの接続先を設定する)
15
15
# DockerfileのWORKDIRで/usr/srcに移動。そのままappと同階層でgunicornを起動するため詳細なappの場所は指定不要
@@ -21,9 +21,9 @@ services:
21
21
dockerfile : Dockerfile
22
22
container_name : nginx_return_http_status_code
23
23
ports :
24
- - " 8004 :80"
24
+ - " ${NGINX_PORT} :80"
25
25
networks :
26
- - net_return_http_status_code
26
+ - internal
27
27
networks :
28
- net_return_http_status_code :
28
+ internal :
29
29
driver : bridge
Original file line number Diff line number Diff line change 1
- FROM python:3.9.5 -slim-buster
1
+ FROM python:3.9.7 -slim-bullseye
2
2
3
3
WORKDIR /usr/src
4
4
5
- COPY requirements.txt ./
6
- RUN pip3 install --no-cache-dir -r requirements.txt
5
+ RUN pip3 install --upgrade pip && \
6
+ pip3 install --no-cache-dir \
7
+ Flask==2.0.1 \
8
+ gunicorn==20.1.0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments