We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7991f23 commit 93a85e2Copy full SHA for 93a85e2
Dockerfile
@@ -0,0 +1,12 @@
1
+### STAGE 1: Build ###
2
+FROM node:12.7-alpine AS build
3
+WORKDIR /usr/src/app
4
+COPY package.json package-lock.json ./
5
+RUN npm install
6
+COPY . .
7
+RUN npm run build
8
+
9
+### STAGE 2: Run ###
10
+FROM nginx:1.17.1-alpine
11
+COPY nginx.conf /etc/nginx/nginx.conf
12
+COPY --from=build /usr/src/app/dist /usr/share/nginx/html
nginx.conf
@@ -0,0 +1,17 @@
+events{}
+http {
+ include /etc/nginx/mime.types;
+ server {
+ listen 80;
+ server_name localhost;
+ root /usr/share/nginx/html;
+ index index.html;
13
+ location / {
14
+ try_files $uri $uri/ /index.html;
15
+ }
16
17
+}
0 commit comments