-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile
48 lines (37 loc) · 1.65 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
# ----------------------------------------------------------------------
# COMPILE REACT APP
# ----------------------------------------------------------------------
FROM --platform=$BUILDPLATFORM node:18 AS frontend
WORKDIR /frontend
COPY scripts scripts/
COPY config config/
COPY package.json yarn.lock jsconfig.json getDefaultConfig.js changeBackend.js /frontend/
RUN yarn && yarn install
# COPY jsconfig.json .
COPY public/ public/
COPY src/ src/
RUN yarn build
# ----------------------------------------------------------------------
# FINAL IMAGE
# ----------------------------------------------------------------------
FROM nginx:alpine
ARG BRANCH="unknown"
ARG BUILDNUMBER="local"
ARG GITSHA1="unknown"
COPY --from=frontend /frontend/build /build/
COPY config.template /config.template
COPY nginx.conf /etc/nginx/conf.d/default.conf
ENV BRANCH="${BRANCH}" \
BUILDNUMBER="${BUILDNUMBER}" \
GITSHA1="${GITSHA1}" \
AUTH0_CLIENT_ID="" \
AUTH0_DOMAIN="" \
CILOGON_CLIENT_ID="" \
APPLICATION_INSIGHTS_KEY="" \
TEST_SIGN_IN=""
# REACT_APP_FRONTEND_COMMIT_ENDPOINT="https://api.github.com/repos/classtranscribe/Frontend/commits/main" \
# If MAINTENANCE_WARNING_BANNER a warning banner is shown on the home page
# MAINTENANCE_WARNING_BANNER="ClassTranscribe will be down for maintenance on Saturday 6am for 1 hour." \
# If CLASSTRANSCRIBE_DOWN_MESSAGE is set to a non-empty string, the frontend will display a message to the user and the app cannot be started
# CLASSTRANSCRIBE_DOWN_MESSAGE="ClassTranscribe is currently down for maintenance. Please try again later." \
CMD envsubst < /config.template > /build/config.js && nginx -g 'daemon off;'