diff --git a/.dockerignore b/.dockerignore index ad2528b..2aba589 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,12 @@ +.git +.gitignore + docs -.venv scripts -README.md + __pycache__ +.venv + + +README.md +Dockerfile diff --git a/Dockerfile b/Dockerfile index 7eede0f..40b9700 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,4 @@ RUN pip3 install -r requirements.txt COPY . . -CMD [ "python3", "-m" , "flask", "--app", "flaskr/app", "run", "--host=0.0.0.0"] +CMD [ "gunicorn", "-w", "4", "flaskr.app:app", "-b", "0.0.0.0:5000"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..9f01324 --- /dev/null +++ b/fly.toml @@ -0,0 +1,37 @@ +# fly.toml file generated for tsoha-flask on 2023-01-20T15:04:43+02:00 + +app = "tsoha-flask" +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[env] + +[experimental] + auto_rollback = true + +[[services]] + http_checks = [] + internal_port = 5000 + processes = ["app"] + protocol = "tcp" + script_checks = [] + [services.concurrency] + hard_limit = 25 + soft_limit = 20 + type = "connections" + + [[services.ports]] + force_https = true + handlers = ["http"] + port = 80 + + [[services.ports]] + handlers = ["tls", "http"] + port = 443 + + [[services.tcp_checks]] + grace_period = "1s" + interval = "15s" + restart_limit = 0 + timeout = "2s" diff --git a/requirements.txt b/requirements.txt index a7ea13b..b7f7563 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,7 @@ -certifi==2022.12.7 -charset-normalizer==3.0.1 click==8.1.3 -docopt==0.6.2 Flask==2.2.2 -idna==3.4 +gunicorn==20.1.0 itsdangerous==2.1.2 Jinja2==3.1.2 MarkupSafe==2.1.2 -requests==2.28.2 -urllib3==1.26.14 Werkzeug==2.2.2 -yarg==0.1.9