Served by uWSGI

This commit is contained in:
elpatron68
2024-05-26 11:36:27 +02:00
parent 5bf3cf3efe
commit 83a8d2f9ca
5 changed files with 30 additions and 9 deletions

View File

@@ -1,21 +1,21 @@
# start by pulling the python image # start by pulling the python image
FROM python:3.8-alpine FROM python:3
# install uwsgi
RUN apt install -y gcc && pip3 install uwsgi
# copy the requirements file into the image # copy the requirements file into the image
COPY ./requirements.txt /app/requirements.txt COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
# switch working directory # switch working directory
WORKDIR /app WORKDIR /app
# install the dependencies and packages in the requirements file
RUN pip install -r requirements.txt
# copy every content from the local file to the image # copy every content from the local file to the image
COPY ./app.py /app COPY ./app.py /app
COPY ./templates/index.html /app/templates/index.html COPY ./templates/index.html /app/templates/index.html
COPY ./static/favicon.ico /app/static/favicon.ico COPY ./static/favicon.ico /app/static/favicon.ico
COPY ./app.ini /app
COPY ./wsgi.py /app
# configure the container to run in an executed manner CMD ["uwsgi","--ini","app.ini"]
ENTRYPOINT [ "python" ]
CMD ["app.py" ]

Binary file not shown.

5
app.ini Normal file
View File

@@ -0,0 +1,5 @@
[uwsgi]
wsgi-file = wsgi.py
master = 5
http = :90
die-on-term = true

View File

@@ -1,3 +1,16 @@
blinker==1.8.2
certifi==2024.2.2
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
dominate==2.9.1
Flask==3.0.3 Flask==3.0.3
Flask-Bootstrap==3.3.7.1 Flask-Bootstrap==3.3.7.1
idna==3.7
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
requests==2.32.2 requests==2.32.2
urllib3==2.2.1
visitor==0.1.3
Werkzeug==3.0.3

3
wsgi.py Normal file
View File

@@ -0,0 +1,3 @@
from app import app as application
if __name__ == "__main__":
application.run()