36 lines
1.1 KiB
Docker
Executable File
36 lines
1.1 KiB
Docker
Executable File
# build stage
|
|
FROM node:lts-alpine as build-stage
|
|
ARG CONTAINER_APP_ROOT="/app"
|
|
ARG FRONTEND_PORT=8080
|
|
# TODO: further testing before turning on
|
|
# ARG ZOOM_CLIENT_ID
|
|
# ARG ZOOM_REDIRECT_URI
|
|
# ARG ZOOM_SCOPE
|
|
RUN npm update npm -g
|
|
RUN npm config set "@fortawesome:registry" https://npm.fontawesome.com/
|
|
RUN npm config set "//npm.fontawesome.com/:_authToken" 58624E90-2685-43C6-BF0F-0BFECCE11CD2
|
|
RUN npm install -g http-server
|
|
WORKDIR ${CONTAINER_APP_ROOT}
|
|
|
|
COPY frontend/package*.json ./
|
|
|
|
RUN npm install
|
|
|
|
COPY frontend/*.js ./
|
|
COPY frontend/*.html ./
|
|
COPY frontend/src ./src
|
|
COPY frontend/public ./public
|
|
|
|
# TODO: further testing before turning on
|
|
# RUN echo "VUE_APP_ZOOM_CLIENT_ID=${ZOOM_CLIENT_ID}" >> .env
|
|
# RUN echo "VUE_APP_ZOOM_REDIRECT_URI=${ZOOM_REDIRECT_URI}" >> .env
|
|
# RUN echo "VUE_APP_ZOOM_SCOPE=${ZOOM_SCOPE}" >> .env
|
|
|
|
RUN npm run build
|
|
|
|
# production stage
|
|
FROM nginx:1.25.2 as production-stage
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
COPY frontend/nginx_docker.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE ${FRONTEND_PORT}
|
|
CMD ["nginx", "-g", "daemon off;"] |