aws_faktury/Dockerfile

37 lines
784 B
Docker
Raw Permalink Normal View History

2024-12-21 21:50:28 +01:00
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 \
2024-12-22 14:52:26 +01:00
nginx \
2024-12-21 21:50:28 +01:00
&& apt-get clean
2024-12-22 18:57:41 +01:00
RUN pip3 install --no-cache-dir Flask PyMuPDF Flask-Cors
2024-12-21 21:50:28 +01:00
WORKDIR /app
COPY . /app
2024-12-22 14:52:26 +01:00
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/
2024-12-21 21:50:28 +01:00
2024-12-22 14:52:26 +01:00
EXPOSE 80 8080
CMD service nginx start && python3 invoice_service.py