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
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" ]
CMD ["uwsgi","--ini","app.ini"]