xiongzhu 3 år sedan
förälder
incheckning
c8b213ae5d
3 ändrade filer med 12 tillägg och 9 borttagningar
  1. 0 1
      .dockerignore
  2. 3 8
      Dockerfile
  3. 9 0
      nginx.conf

+ 0 - 1
.dockerignore

@@ -9,7 +9,6 @@ lerna-debug.log*
 
 node_modules
 .DS_Store
-dist
 dist-ssr
 coverage
 *.local

+ 3 - 8
Dockerfile

@@ -1,8 +1,3 @@
-# syntax=docker/dockerfile:1
-FROM node:14
-
-WORKDIR /app
-COPY . .
-RUN npm install
-RUN npm run build
-VOLUME dist /app/dist
+FROM nginx:stable-alpine
+COPY dist /usr/share/nginx/html
+COPY nginx.conf /etc/nginx/conf.d/default.conf

+ 9 - 0
nginx.conf

@@ -0,0 +1,9 @@
+server {
+    listen       80;
+
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+        try_files $uri $uri/ /index.html last;
+    }
+}