aws_faktury/Dockerfile
dzikafoczka 9b4d51c256 test
2024-12-22 18:57:41 +01:00

37 lines
784 B
Docker

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y \
python3 \
python3-pip \
python3-dev \
libpoppler-cpp-dev \
build-essential \
curl \
git \
nginx \
&& apt-get clean
RUN pip3 install --no-cache-dir Flask PyMuPDF Flask-Cors
WORKDIR /app
COPY . /app
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/
EXPOSE 80 8080
CMD service nginx start && python3 invoice_service.py