diff --git a/Dockerfile b/Dockerfile index 94a93c2..c044bd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,21 @@ # 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 ./requirements.txt /app/requirements.txt +COPY ./requirements.txt /tmp/requirements.txt +RUN pip3 install --no-cache-dir -r /tmp/requirements.txt # switch working directory 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 ./app.py /app COPY ./templates/index.html /app/templates/index.html 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 -ENTRYPOINT [ "python" ] - -CMD ["app.py" ] \ No newline at end of file +CMD ["uwsgi","--ini","app.ini"] \ No newline at end of file diff --git a/__pycache__/app.cpython-310.pyc b/__pycache__/app.cpython-310.pyc new file mode 100644 index 0000000..3f88c0f Binary files /dev/null and b/__pycache__/app.cpython-310.pyc differ diff --git a/app.ini b/app.ini new file mode 100644 index 0000000..bbb6508 --- /dev/null +++ b/app.ini @@ -0,0 +1,5 @@ +[uwsgi] +wsgi-file = wsgi.py +master = 5 +http = :90 +die-on-term = true \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index a8f81e7..69a1847 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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-Bootstrap==3.3.7.1 +idna==3.7 +itsdangerous==2.2.0 +Jinja2==3.1.4 +MarkupSafe==2.1.5 requests==2.32.2 +urllib3==2.2.1 +visitor==0.1.3 +Werkzeug==3.0.3 diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..986264e --- /dev/null +++ b/wsgi.py @@ -0,0 +1,3 @@ +from app import app as application +if __name__ == "__main__": + application.run() \ No newline at end of file