This repository was archived by the owner on Aug 22, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (31 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
45 lines (31 loc) · 1.19 KB
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
42
43
44
45
# Build client application
FROM node:10 AS build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY client/package.json /app/package.json
RUN npm install react-scripts@3.0.1 -g --silent
RUN npm install --silent
COPY client /app
RUN npm run build
# Build main image
FROM python:3.6
WORKDIR /app
# Use python -u/unbuffered setting
ENV PYTHONUNBUFFERED 1
# Upgrade pip
RUN pip install --upgrade pip
# Install requirements
COPY server/requirements /app/requirements
RUN pip install -r requirements/prod.txt
# Must be before static file copies
# https://stackoverflow.com/questions/51115856/docker-failed-to-export-image-failed-to-create-image-failed-to-get-layer
COPY server /app
# NOTE: This needs to be improved, but works for now
COPY --from=build /app/server/core/templates/index.html /app/core/templates/index.html
COPY --from=build /app/server/core/static /app/core/static
COPY --from=build /app/build/assets /app/core/static
COPY --from=build /app/build/favicon.ico /app/core/static
COPY --from=build /app/build/manifest.json /app/core/static
COPY --from=build /app/build/asset-manifest.json /app/core/static
COPY --from=build /app/build/service-worker.js /app/core/static
CMD "scripts/startup.sh"