deyang.gu 2 anni fa
parent
commit
6d8d489419
2 ha cambiato i file con 29 aggiunte e 0 eliminazioni
  1. 9 0
      Dockerfile
  2. 20 0
      nginx_parking.conf

+ 9 - 0
Dockerfile

@@ -0,0 +1,9 @@
+FROM kerrysmart-registry-vpc.cn-shanghai.cr.aliyuncs.com/base/nginx:parking
+COPY prod-index.html /prod-index.html
+COPY dist/* /usr/share/nginx/html/
+COPY nginx_parking.conf /etc/nginx/conf.d/
+RUN rm -rf /usr/share/nginx/html/static && \
+    rm -rf /usr/share/nginx/html/manual && \
+    rm -rf /etc/nginx/conf.d/default.conf
+ 
+

+ 20 - 0
nginx_parking.conf

@@ -0,0 +1,20 @@
+server {
+    listen       80;
+    server_name  _;
+
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+	try_files $uri $uri/ router;
+    }
+    location router {
+        rewrite ^.*$ /index.html last;
+    }
+
+
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   /usr/share/nginx/html;
+    }
+
+}