2021-01-20 03:59:58 +05:30
|
|
|
# stage1 as builder
|
2022-03-22 16:22:02 +05:30
|
|
|
FROM node:12.22.0 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
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
# copy the package.json to install dependencies
|
|
|
|
|
COPY package.json ./
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
# Install the dependencies and make the folder
|
|
|
|
|
RUN yarn install
|
|
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
# Build the project and copy the files
|
|
|
|
|
RUN yarn build
|
|
|
|
|
|
2021-07-14 23:36:27 +05:30
|
|
|
FROM nginx:1.18-alpine
|
2021-01-20 03:59:58 +05:30
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
COPY conf/default.conf /etc/nginx/conf.d/default.conf
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
## Remove default nginx index page
|
|
|
|
|
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
|
|
|
|
2021-01-20 03:59:58 +05:30
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|