mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-06-13 14:09:26 +02:00
12
flask/Dockerfile
Normal file
12
flask/Dockerfile
Normal 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"]
|
BIN
flask/__pycache__/website.cpython-311.pyc
Normal file
BIN
flask/__pycache__/website.cpython-311.pyc
Normal file
Binary file not shown.
20
flask/app.ini
Normal file
20
flask/app.ini
Normal 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
12
flask/requirements.txt
Normal 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
9
flask/website.py
Normal 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
4
flask/wsgi.py
Normal file
@ -0,0 +1,4 @@
|
||||
from website import app
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0")
|
Reference in New Issue
Block a user