Browse Source

add tool4deploy

郭超 2 years ago
parent
commit
81c221955d

+ 1 - 1
.gitignore

@@ -1,7 +1,7 @@
 .DS_Store
 node_modules/
 /dist/
-/tool4deploy/
+#/tool4deploy/
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*

+ 11 - 0
tool4deploy/Dockerfile

@@ -0,0 +1,11 @@
+FROM nginx
+
+RUN rm -rf /usr/share/nginx/html/*
+
+COPY ./crowd-web /usr/share/nginx/html/
+
+RUN chmod -R 777 /usr/share/nginx/html
+
+EXPOSE 80
+
+CMD ["nginx", "-g", "daemon off;"]

+ 44 - 0
tool4deploy/conf.d/nginx.conf

@@ -0,0 +1,44 @@
+server {
+        listen       80;
+        server_name  www.cofortest.com;
+        root /usr/share/nginx/html;
+        #charset koi8-r;
+        client_max_body_size 100m;
+        #access_log  logs/host.access.log  main;
+
+        # 开启代理缓冲区
+        proxy_buffering on;
+        # 响应头的缓冲区
+        proxy_buffer_size 128k;
+        # 网页内容缓冲区的个数为4,单个大小为1M
+        proxy_buffers 8 1M;
+        proxy_busy_buffers_size 2M;
+
+        location / {
+            root /usr/share/nginx/html;
+        }
+
+        location /api {
+            proxy_set_header Host                          $host;
+            proxy_set_header X-Real-IP                  $remote_addr;
+            proxy_set_header X-Forwarded-For      $proxy_add_x_forwarded_for;
+            proxy_pass http://backend:8080;
+            proxy_connect_timeout 1200s;
+            proxy_read_timeout 1200s;
+            proxy_send_timeout 1200s;
+        }
+
+        location /recommendationtest {
+            proxy_pass http://taskRecommend:7477;
+        }
+
+
+        #error_page  404              /404.html;
+
+        # redirect server error pages to the static page /50x.html
+        #
+        error_page   500 502 503 504  /50x.html;
+        location = /50x.html {
+            root   html;
+        }
+ }

+ 0 - 0
tool4deploy/crowd-web/.gitkeep


+ 0 - 0
tool4deploy/crowd-web/README.MD


+ 1 - 0
tool4deploy/slider-type.js

@@ -0,0 +1 @@
+export const  slice_type =  0 // 0:online , 1:private