Ver Fonte

feat: 不动产资源地图和报告页面docker脚本

weijianghai há 1 ano atrás
pai
commit
0137d6d231

+ 3 - 0
scripts/house-report/.dockerignore

@@ -0,0 +1,3 @@
+*
+!default.conf
+!dist.zip

+ 5 - 0
scripts/house-report/Dockerfile

@@ -0,0 +1,5 @@
+FROM nginx:1.24.0-alpine-slim
+LABEL type="app" name="house-report"
+COPY dist.zip dist.zip
+RUN unzip dist.zip && rm -rf dist.zip
+COPY default.conf /etc/nginx/conf.d/

+ 26 - 0
scripts/house-report/default.conf

@@ -0,0 +1,26 @@
+server {
+    listen       39202;
+    listen  [::]:39202;
+    server_name 133.96.95.30, 172.16.107.4, localhost;
+
+    access_log access.log;
+    error_log error.log;
+
+    location / {
+        root   /dist;
+        index  index.html index.htm;
+        try_files $uri $uri/ /index.html;
+    }
+    # 后端
+    location /house-car/house/report/api {
+        proxy_pass http://172.16.107.4:39100;
+    }
+    # minio
+    location /house-car/oss {
+        proxy_pass http://172.16.107.4:39000;
+    }
+    # 百度地图
+    location /dugis-baidu {
+        proxy_pass http://172.16.107.4:39000;
+    }
+}

+ 6 - 0
scripts/house-report/rollback.sh

@@ -0,0 +1,6 @@
+#!/bin/sh
+
+CONTAINER_NAME=house-report
+TAG=$1
+docker stop "${CONTAINER_NAME}" && docker rm -f "${CONTAINER_NAME}"
+docker run --name "${CONTAINER_NAME}" --restart=unless-stopped --network=host -d "${CONTAINER_NAME}":"${TAG}"

+ 7 - 0
scripts/house-report/update.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+
+CONTAINER_NAME=house-report
+TAG=$(date +%Y%m%d%H%M%S)
+docker stop "${CONTAINER_NAME}" && docker rm -f "${CONTAINER_NAME}"
+docker build -t "${CONTAINER_NAME}":"${TAG}" .
+docker run --name "${CONTAINER_NAME}" --restart=unless-stopped --network=host -d "${CONTAINER_NAME}":"${TAG}"

+ 3 - 0
scripts/house-resource-map/.dockerignore

@@ -0,0 +1,3 @@
+*
+!default.conf
+!dist.zip

+ 5 - 0
scripts/house-resource-map/Dockerfile

@@ -0,0 +1,5 @@
+FROM nginx:1.24.0-alpine-slim
+LABEL type="app" name="house-resource-map"
+COPY dist.zip dist.zip
+RUN unzip dist.zip && rm -rf dist.zip
+COPY default.conf /etc/nginx/conf.d/

+ 26 - 0
scripts/house-resource-map/default.conf

@@ -0,0 +1,26 @@
+server {
+    listen       39201;
+    listen  [::]:39201;
+    server_name 133.96.95.30, 172.16.107.4, localhost;
+
+    access_log access.log;
+    error_log error.log;
+
+    location / {
+        root   /dist;
+        index  index.html index.htm;
+        try_files $uri $uri/ /index.html;
+    }
+    # 后端
+    location /house-car/house/resource-map/api {
+        proxy_pass http://172.16.107.4:39100;
+    }
+    # minio
+    location /house-car/oss {
+        proxy_pass http://172.16.107.4:39000;
+    }
+    # 百度地图
+    location /dugis-baidu {
+        proxy_pass http://172.16.107.4:39000;
+    }
+}

+ 6 - 0
scripts/house-resource-map/rollback.sh

@@ -0,0 +1,6 @@
+#!/bin/sh
+
+CONTAINER_NAME=house-resource-map
+TAG=$1
+docker stop "${CONTAINER_NAME}" && docker rm -f "${CONTAINER_NAME}"
+docker run --name "${CONTAINER_NAME}" --restart=unless-stopped --network=host -d "${CONTAINER_NAME}":"${TAG}"

+ 7 - 0
scripts/house-resource-map/update.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+
+CONTAINER_NAME=house-resource-map
+TAG=$(date +%Y%m%d%H%M%S)
+docker stop "${CONTAINER_NAME}" && docker rm -f "${CONTAINER_NAME}"
+docker build -t "${CONTAINER_NAME}":"${TAG}" .
+docker run --name "${CONTAINER_NAME}" --restart=unless-stopped --network=host -d "${CONTAINER_NAME}":"${TAG}"