diff --git a/Dockerfile b/Dockerfile index 289a655..2df0781 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN apt-get update && apt-get upgrade -y \ build-essential \ curl \ git \ + nginx \ && apt-get clean RUN pip3 install --no-cache-dir Flask PyMuPDF @@ -19,6 +20,17 @@ WORKDIR /app COPY . /app -EXPOSE 8080 +RUN rm -f /etc/nginx/sites-enabled/default \ + && echo 'server { \ + listen 80; \ + server_name localhost; \ + location / { \ + root /app/static; \ + index index.html; \ + } \ + }' > /etc/nginx/sites-available/static_site \ + && ln -s /etc/nginx/sites-available/static_site /etc/nginx/sites-enabled/ -CMD ["python3", "invoice_service.py"] +EXPOSE 80 8080 + +CMD service nginx start && python3 invoice_service.py