forked from recurship/event-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (22 loc) · 609 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
# Build the frontend
FROM node:8.11.3-alpine
WORKDIR /client
COPY ./client/package.json package.json
COPY ./client/package-lock.json package-lock.json
RUN npm install
COPY ./client/public ./public
COPY ./client/src ./src
RUN npm run build
# Build the backend + plug in the dist
FROM python:3.6-slim
ENV PYTHONUNBUFFERED 1
ENV DEBUG False
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/
COPY --from=0 /client/build /code/frontend
RUN python3 manage.py collectstatic
CMD python3 manage.py migrate && \
python3 manage.py runserver 0.0.0.0:$PORT