fix images
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d1ec0538d9
commit
20d5093276
@ -1,9 +1,19 @@
|
|||||||
FROM node:lts-alpine as builder
|
# stage1 as builder
|
||||||
|
FROM node:16-alpine as builder
|
||||||
|
# Copy the package.json and install dependencies
|
||||||
|
COPY package*.json ./
|
||||||
|
RUN npm install
|
||||||
|
# Copy rest of the files
|
||||||
|
COPY . .
|
||||||
|
# Build the project
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . ./
|
|
||||||
RUN npm install && npm run build
|
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine as production-build
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
## Remove default nginx index page
|
||||||
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
|
# Copy from the stage 1
|
||||||
|
COPY --from=builder /dist /usr/share/nginx/html/nested-app
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
@ -1,20 +1,16 @@
|
|||||||
worker_processes 1;
|
worker_processes 4;
|
||||||
|
|
||||||
events {
|
events { worker_connections 1024; }
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8000;
|
listen 8080;
|
||||||
server_name localhost;
|
root /usr/share/nginx/html/nested-app;
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
location / {
|
location /nested-app/ {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
try_files $uri $uri/ /nested-app/index.html;
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue