signoz/frontend/Dockerfile

31 lines
570 B
Docker
Raw Normal View History

2021-01-20 03:59:58 +05:30
# stage1 as builder
2021-02-23 22:12:54 +05:30
FROM node:12-alpine as builder
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-02-23 22:12:54 +05:30
FROM nginx:1.12-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
2021-01-20 03:59:58 +05:30
EXPOSE 3000
2021-01-03 18:15:44 +05:30
2021-01-20 03:59:58 +05:30
ENTRYPOINT ["nginx", "-g", "daemon off;"]