-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
90 lines (79 loc) · 3.5 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# create-react-app build environment
FROM node:20-alpine as react-build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
ARG REACT_APP_ES_PROXY_HOST
ARG REACT_APP_API_SERVICE_ADDRESS
ARG REACT_APP_API_SERVICE_KEY
ARG REACT_APP_SIGNED_URL_ENDPOINT
ARG REACT_APP_USER_REGISTRATION_ENDPOINT
ARG REACT_APP_SEND_EMAIL_ENDPOINT
ARG REACT_APP_FILE_DOWNLOAD_ENDPOINT
ARG REACT_APP_QC_DATA_ENDPOINT
ARG REACT_APP_ES_ENDPOINT
ARG REACT_APP_FILE_SEARCH_ENDPOINT
ARG REACT_APP_DATA_FILE_BUCKET
ARG REACT_APP_QC_REPORT_BUCKET
ARG REACT_APP_ES_ACCESS_TOKEN
ARG REACT_APP_reCAPTCHA_SITE_KEY
ARG REACT_APP_AUTH0_CLIENT_ID
ARG REACT_APP_QUALTRICS_SURVEY_URL
ARG REACT_APP_USER_SURVEY_SUBMIT_URL
ARG REACT_APP_USER_SURVEY_INPUT_1
ARG REACT_APP_USER_SURVEY_INPUT_2
ARG REACT_APP_USER_SURVEY_INPUT_3
ARG REACT_APP_USER_SURVEY_INPUT_4
ARG REACT_APP_USER_SURVEY_INPUT_5
ARG REACT_APP_OFFICE_HOUR_DAY
ARG REACT_APP_OFFICE_HOUR_DATE
ARG REACT_APP_OFFICE_HOUR_SIGNUP_URL
ENV ESLINT_NO_DEV_ERRORS true
ENV DISABLE_ESLINT_PLUGIN true
ENV REACT_APP_ES_PROXY_HOST $REACT_APP_ES_PROXY_HOST
ENV REACT_APP_API_SERVICE_ADDRESS $REACT_APP_API_SERVICE_ADDRESS
ENV REACT_APP_API_SERVICE_KEY $REACT_APP_API_SERVICE_KEY
ENV REACT_APP_SIGNED_URL_ENDPOINT $REACT_APP_SIGNED_URL_ENDPOINT
ENV REACT_APP_USER_REGISTRATION_ENDPOINT $REACT_APP_USER_REGISTRATION_ENDPOINT
ENV REACT_APP_SEND_EMAIL_ENDPOINT $REACT_APP_SEND_EMAIL_ENDPOINT
ENV REACT_APP_FILE_DOWNLOAD_ENDPOINT $REACT_APP_FILE_DOWNLOAD_ENDPOINT
ENV REACT_APP_QC_DATA_ENDPOINT $REACT_APP_QC_DATA_ENDPOINT
ENV REACT_APP_ES_ENDPOINT $REACT_APP_ES_ENDPOINT
ENV REACT_APP_FILE_SEARCH_ENDPOINT $REACT_APP_FILE_SEARCH_ENDPOINT
ENV REACT_APP_DATA_FILE_BUCKET $REACT_APP_DATA_FILE_BUCKET
ENV REACT_APP_QC_REPORT_BUCKET $REACT_APP_QC_REPORT_BUCKET
ENV REACT_APP_ES_ACCESS_TOKEN $REACT_APP_ES_ACCESS_TOKEN
ENV REACT_APP_reCAPTCHA_SITE_KEY $REACT_APP_reCAPTCHA_SITE_KEY
ENV REACT_APP_AUTH0_CLIENT_ID $REACT_APP_AUTH0_CLIENT_ID
ENV REACT_APP_QUALTRICS_SURVEY_URL $REACT_APP_QUALTRICS_SURVEY_URL
ENV REACT_APP_USER_SURVEY_SUBMIT_URL $REACT_APP_USER_SURVEY_SUBMIT_URL
ENV REACT_APP_USER_SURVEY_INPUT_1 $REACT_APP_USER_SURVEY_INPUT_1
ENV REACT_APP_USER_SURVEY_INPUT_2 $REACT_APP_USER_SURVEY_INPUT_2
ENV REACT_APP_USER_SURVEY_INPUT_3 $REACT_APP_USER_SURVEY_INPUT_3
ENV REACT_APP_USER_SURVEY_INPUT_4 $REACT_APP_USER_SURVEY_INPUT_4
ENV REACT_APP_USER_SURVEY_INPUT_5 $REACT_APP_USER_SURVEY_INPUT_5
ENV REACT_APP_OFFICE_HOUR_DAY $REACT_APP_OFFICE_HOUR_DAY
ENV REACT_APP_OFFICE_HOUR_DATE $REACT_APP_OFFICE_HOUR_DATE
ENV REACT_APP_OFFICE_HOUR_SIGNUP_URL $REACT_APP_OFFICE_HOUR_SIGNUP_URL
COPY package*.json yarn.lock ./
RUN --mount=type=cache,target=/root/.yarn \
YARN_CACHE_FOLDER=/root/.yarn JOBS=max \
yarn install --network-timeout 1000000
COPY src ./src
COPY public ./public
RUN --mount=type=cache,target=/root/.yarn \
YARN_CACHE_FOLDER=/root/.yarn JOBS=max \
yarn sass
RUN --mount=type=cache,target=/root/.yarn \
YARN_CACHE_FOLDER=/root/.yarn JOBS=max \
yarn build
# nginx server environment
FROM nginxinc/nginx-unprivileged:1.25-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=react-build /app/build /usr/share/nginx/html
LABEL org.opencontainers.image.description="MoTrPAC Data Portal Docker Image"
LABEL org.opencontainers.image.documentation="https://github.com/MoTrPAC/motrpac-frontend"
LABEL org.opencontainers.image.title="MoTrPAC Data Portal Web Client Server"
LABEL org.opencontainers.image.url="https://motrpac-data.org"
LABEL org.opencontainers.image.vendor="MoTrPAC"
LABEL org.opencontainers.image.version=$IMAGE_VERSION
EXPOSE 8080