mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-19 01:51:30 +08:00
Add Dockerfile
This commit is contained in:
parent
14a585641c
commit
6cf2fb5490
@ -1,32 +1,15 @@
|
|||||||
# stage1 as builder
|
FROM node:12.20.1-alpine3.9
|
||||||
FROM node:14-alpine as builder
|
|
||||||
|
|
||||||
# copy the package.json to install dependencies
|
|
||||||
COPY package.json ./
|
|
||||||
|
|
||||||
# Install the dependencies and make the folder
|
|
||||||
RUN npm install && mkdir /react-ui && mv ./node_modules ./react-ui
|
|
||||||
|
|
||||||
WORKDIR /react-ui
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build the project and copy the files
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
|
|
||||||
FROM nginx:1.15-alpine
|
ADD ./ ./frontend
|
||||||
|
|
||||||
#!/bin/sh
|
WORKDIR /frontend
|
||||||
|
|
||||||
COPY conf/default.conf /etc/nginx/conf.d/default.conf
|
RUN yarn && yarn build
|
||||||
|
RUN yarn global add serve
|
||||||
|
|
||||||
## Remove default nginx index page
|
ARG PORT=3000
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
|
||||||
|
|
||||||
# Copy from the stahg 1
|
EXPOSE $PORT
|
||||||
COPY --from=builder /react-ui/build /usr/share/nginx/html
|
|
||||||
|
|
||||||
EXPOSE 3000
|
CMD ["serve", "-s","build"]
|
||||||
|
|
||||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
|
6
frontend/docker-compose.yml
Normal file
6
frontend/docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
Loading…
x
Reference in New Issue
Block a user