2022-05-20 19:14:58 +05:30
|
|
|
# Builder stage
|
2022-05-20 15:07:47 +05:30
|
|
|
FROM node:16.15.0-slim as builder
|
2021-07-14 23:36:27 +05:30
|
|
|
|
|
|
|
|
# Add Maintainer Info
|
|
|
|
|
LABEL maintainer="signoz"
|
|
|
|
|
|
|
|
|
|
ARG TARGETOS=linux
|
|
|
|
|
ARG TARGETARCH
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
WORKDIR /frontend
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2023-01-25 19:58:44 +05:30
|
|
|
# Copy the package.json and .yarnrc files prior to install dependencies
|
2021-01-20 03:59:58 +05:30
|
|
|
COPY package.json ./
|
2023-01-25 19:58:44 +05:30
|
|
|
COPY .yarnrc ./
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
# Install the dependencies and make the folder
|
2022-09-13 22:44:24 +05:30
|
|
|
RUN CI=1 yarn install
|
2021-01-20 03:59:58 +05:30
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
# Build the project and copy the files
|
|
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
|
|
|
2022-05-20 19:14:58 +05:30
|
|
|
FROM nginx:1.18-alpine
|
2021-01-20 03:59:58 +05:30
|
|
|
|
|
|
|
|
COPY conf/default.conf /etc/nginx/conf.d/default.conf
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2022-05-20 19:14:58 +05:30
|
|
|
# Remove default nginx index page
|
2021-01-20 03:59:58 +05:30
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
# Copy from the stahg 1
|
|
|
|
|
COPY --from=builder /frontend/build /usr/share/nginx/html
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2022-02-08 22:47:06 +05:30
|
|
|
EXPOSE 3301
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2022-05-20 15:07:47 +05:30
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|