2021-07-12 09:15:42 +00:00
|
|
|
# pull official base image
|
2021-08-26 15:04:30 +00:00
|
|
|
FROM node:14.17.3-alpine
|
|
|
|
|
|
|
|
|
|
ENV NODE_ENV=development
|
2021-07-12 09:15:42 +00:00
|
|
|
|
2022-01-17 07:08:17 +00:00
|
|
|
RUN npm i -g npm@7.20.0
|
|
|
|
|
|
2021-07-12 09:15:42 +00:00
|
|
|
# set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2022-01-17 07:08:17 +00:00
|
|
|
COPY ./package.json ./package.json
|
|
|
|
|
|
2021-07-12 09:15:42 +00:00
|
|
|
# add `/app/node_modules/.bin` to $PATH
|
|
|
|
|
ENV PATH /app/node_modules/.bin:$PATH
|
|
|
|
|
|
|
|
|
|
# Fix for heap limit allocation issue
|
2021-11-20 01:25:54 +00:00
|
|
|
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
2021-07-12 09:15:42 +00:00
|
|
|
|
2022-01-17 07:08:17 +00:00
|
|
|
# Build plugins
|
|
|
|
|
COPY ./plugins/package.json ./plugins/package-lock.json ./plugins/
|
|
|
|
|
RUN npm --prefix plugins install
|
|
|
|
|
COPY ./plugins/ ./plugins/
|
|
|
|
|
RUN npm run build:plugins
|
2021-09-21 13:48:28 +00:00
|
|
|
|
2021-07-12 09:15:42 +00:00
|
|
|
# install app dependencies
|
2022-01-17 07:08:17 +00:00
|
|
|
COPY ./frontend/package.json ./frontend/package-lock.json ./frontend/
|
|
|
|
|
RUN npm --prefix frontend install
|
|
|
|
|
COPY ./frontend/ ./frontend/
|
2021-07-12 09:15:42 +00:00
|
|
|
|
2022-01-17 07:08:17 +00:00
|
|
|
RUN npm install react-scripts@3.4.1 -g --silent
|
2021-07-12 09:15:42 +00:00
|
|
|
|
|
|
|
|
# start app
|
2022-01-17 07:08:17 +00:00
|
|
|
CMD ["npm", "--prefix", "frontend", "start"]
|
2021-07-12 09:15:42 +00:00
|
|
|
|
|
|
|
|
EXPOSE 8082
|