-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
32 lines (26 loc) · 801 Bytes
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
# Stage 0 - Node build
FROM node:8
WORKDIR /kerckhoff
ENV DEBUG False
ADD package.json package-lock.json /kerckhoff/
RUN npm i
COPY ./webpack.config.js ./jsconfig.json ./
COPY ./kerckhoff/assets ./kerckhoff/assets
RUN npm run build
# Stage 1 - Python dependencies
FROM python:3.6-slim
ENV PYTHONUNBUFFERED 1
RUN mkdir /kerckhoff
RUN apt-get update && apt-get install -y curl \
build-essential \
libpq-dev \
git
WORKDIR /kerckhoff
ADD requirements.txt /kerckhoff/
RUN pip install -r requirements.txt
# Get the webpack built assets from the previous stage
COPY --from=0 /kerckhoff /kerckhoff
ADD . /kerckhoff/
EXPOSE 5000
ENTRYPOINT [ "./prod-entrypoint.sh" ]
CMD "./prod.sh"