pp3
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
5c57a1a08a
commit
a69e19f917
@ -1,13 +1,12 @@
|
|||||||
FROM node:alpine
|
### STAGE 1: Build ###
|
||||||
|
FROM node:alpine AS build
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
COPY . /usr/src/app
|
|
||||||
|
|
||||||
RUN npm install -g @angular/cli
|
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
EXPOSE 8080
|
### STAGE 2: Run ###
|
||||||
|
FROM nginx:alpine
|
||||||
CMD ["ng", "serve", "--host", "0.0.0.0", "--port", "8080"]
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY --from=build /usr/src/app/dist/portfolioo/browser /usr/share/nginx/html
|
||||||
|
@ -0,0 +1,14 @@
|
|||||||
|
events{}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name localhost;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue