-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
43 lines (29 loc) · 913 Bytes
/
Dockerfile.prod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.9.5-slim-buster as build
ARG loki_user
ARG loki_pass
ENV loki_user ${loki_user}
ENV loki_pass ${loki_pass}
# Install Libraries
RUN apt-get update \
&& apt-get -y install pandoc texlive-latex-extra\
&& apt-get clean
# Set working directory for all following in container commands
WORKDIR /usr/src/app
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBUG 1
# Install requirements
COPY ./app/requirements.txt /usr/src/app
RUN pip install -r requirements.txt
# Grab files
COPY ./app /usr/src/app
# Compile content
RUN python MarkdownExploder.py
# Start with Nginx As our base
FROM nginx:latest
RUN apt-get update \
&& apt-get -y install nano
COPY ./app/nginx/prod.nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/app /usr/share/nginx/html
COPY --from=build /usr/src/app/assets/favicon.ico /usr/share/nginx/html/favicon.ico
WORKDIR /usr/share/nginx/html