forked from fortech-oss/micro-invoicer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
36 lines (29 loc) · 772 Bytes
/
Dockerfile
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
FROM python:3-slim
# prepare base image
RUN apt update && apt install --yes \
locales \
locales-all \
entr \
git \
wkhtmltopdf \
&& rm -rf /var/lib/apt/lists/*
# prepare application folder
RUN mkdir -p /app/src \
&& mkdir -p /app/shared
# install python dependencies
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Fix file watcher on Mac (see: https://github.com/eradman/entr/issues/3)
ENV ENTR_INOTIFY_WORKAROUND 1
# prepare application container
COPY entrypoint /app/
ENTRYPOINT ["/app/entrypoint"]
COPY ./src /app/src
EXPOSE 8000
ENV SERVICE_PORT=8000
CMD ["start"]
VOLUME [ "/app/src" ]
VOLUME [ "/app/shared" ]
VOLUME [ "/app/htmlcov/" ]