Skip to content

Commit 9af48b4

Browse files
committed
For container testing.
1 parent 43fe48b commit 9af48b4

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git*
2+
**/*.pyc
3+
.venv/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ celerybeat.pid
104104
# Environments
105105
.env
106106
.venv
107+
.venvpy
107108
env/
108109
venv/
109110
ENV/

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM python:3.11
4+
5+
WORKDIR /code
6+
7+
COPY requirements.txt .
8+
9+
RUN pip3 install -r requirements.txt
10+
11+
COPY . .
12+
13+
EXPOSE 50505
14+
15+
ENTRYPOINT ["gunicorn", "app:app"]

gunicorn.conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Gunicorn configuration file
2+
import multiprocessing
3+
4+
max_requests = 1000
5+
max_requests_jitter = 50
6+
7+
log_file = "-"
8+
9+
bind = "0.0.0.0:50505"
10+
11+
workers = (multiprocessing.cpu_count() * 2) + 1
12+
threads = workers
13+
14+
timeout = 120

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Flask==2.0.2
1+
Flask==2.0.2
2+
gunicorn

0 commit comments

Comments
 (0)