Add files

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
2022-11-24 13:32:59 +01:00
parent d61c8ccb89
commit 20d8f9efb7
20 changed files with 707 additions and 0 deletions

12
flask/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
ARG DOCKER_IMAGE=python:3.11-buster
FROM $DOCKER_IMAGE
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD ["uwsgi", "app.ini"]

Binary file not shown.

20
flask/app.ini Normal file
View File

@ -0,0 +1,20 @@
[uwsgi]
plugins = python
wsgi-file = wsgi.py
callable = app
# Or: module = wsgi:app
socket = :8080
# Or: socket = flask_server.sock
chmod-socket = 660
processes = 8
threads = 2
master = true
vacuum = true
die-on-term = true
# enable-threads = true #enable threads support
env = LANG=en_US.UTF-8

12
flask/requirements.txt Normal file
View File

@ -0,0 +1,12 @@
requests
flask
flask-babel
flask-login
flask-sqlalchemy
flask-assets
flask-wtf
flask-mail
uwsgi

9
flask/website.py Normal file
View File

@ -0,0 +1,9 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<h1 style='color:blue'>Hello There!</h1>"
if __name__ == "__main__":
app.run(host='0.0.0.0')

4
flask/wsgi.py Normal file
View File

@ -0,0 +1,4 @@
from website import app
if __name__ == "__main__":
app.run(host="0.0.0.0")