提交部署文件
This commit is contained in:
parent
7b93c23c93
commit
df6dfee8ba
|
@ -12,5 +12,6 @@ port= 9988
|
|||
|
||||
# 服务端地址
|
||||
//target = http://192.168.18.134:8899
|
||||
target = http://192.168.18.139:8899
|
||||
//target = http://192.168.18.139:8899
|
||||
// target = http://192.168.18.136:8899
|
||||
target = http://192.168.10.241:30646
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
FROM nginx
|
||||
MAINTAINER lfzxs@qq.com
|
||||
VOLUME /tmp
|
||||
ENV LANG en_US.UTF-8
|
||||
RUN echo "server { \
|
||||
listen 80; \
|
||||
location ^~ /smart-power { \
|
||||
#后端地址
|
||||
proxy_pass http://192.168.10.241:30646/; \
|
||||
proxy_set_header Host smart-power; \
|
||||
proxy_set_header X-Real-IP \$remote_addr; \
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
|
||||
} \
|
||||
#解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
|
||||
location / { \
|
||||
root /var/www/html/; \
|
||||
index index.html index.htm; \
|
||||
if (!-e \$request_filename) { \
|
||||
rewrite ^(.*)\$ /index.html?s=\$1 last; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
access_log /var/log/nginx/access.log ; \
|
||||
} " > /etc/nginx/conf.d/default.conf \
|
||||
&& mkdir -p /var/www \
|
||||
&& mkdir -p /var/www/html
|
||||
|
||||
ADD dist/ /var/www/html/
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: smart-power-ui
|
||||
component: $APP_SENVICE_NAME
|
||||
name: $APP_SENVICE_NAME
|
||||
namespace: $APP_NAME_SPACE
|
||||
spec:
|
||||
ports:
|
||||
- name: http-80
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: smart-power-ui
|
||||
component: $APP_SENVICE_NAME
|
||||
tier: backend
|
||||
sessionAffinity: None
|
||||
type: NodePort
|
|
@ -0,0 +1,46 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: smart-power-ui
|
||||
component: $APP_SENVICE_NAME
|
||||
tier: backend
|
||||
name: $APP_SENVICE_NAME
|
||||
namespace: $APP_NAME_SPACE
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: smart-power-ui
|
||||
component: $APP_SENVICE_NAME
|
||||
tier: backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: smart-power-ui
|
||||
component: $APP_SENVICE_NAME
|
||||
tier: backend
|
||||
spec:
|
||||
containers:
|
||||
- image: $REGISTRY_histron/$DOCKERHUB_NAMESPACE_histron/$APP_NAME_histron:$BRANCH_NAME-$BUILD_NUMBER
|
||||
imagePullPolicy: Always
|
||||
name: $APP_SENVICE_NAME
|
||||
ports:
|
||||
- name: http-80
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1000Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1000Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
imagePullSecrets:
|
||||
- name: histron
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
|
@ -12,7 +12,7 @@ let iotWebSocketAlarmBaseUrl = ''
|
|||
let BaseUrl = ''
|
||||
|
||||
// 手动配置的地址
|
||||
var iotHost="192.168.18.139:8899"; // 海创iot 平台 host
|
||||
var iotHost="192.168.10.241:30646"; // 海创iot 平台 host
|
||||
// var hrefHost = window.location.host;
|
||||
// let httpProtocol = window.location.protocol;
|
||||
var hrefHost = '192.168.18.139';
|
|
@ -1,5 +1,5 @@
|
|||
import axios from "axios";
|
||||
import { iotPlatformUrl } from '/public/config/env'
|
||||
import { iotPlatformUrl } from '/public/js/config'
|
||||
import { getDevcieApp } from "@/api/app";
|
||||
|
||||
var appInfo = {}
|
||||
|
|
|
@ -4,7 +4,7 @@ import store from '@/store'
|
|||
import { getToken } from '@/utils/auth'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import { preventCloseFu } from "@/utils/hciot";
|
||||
import { BaseUrl } from '/public/config/env'
|
||||
import { BaseUrl } from '/public/js/config'
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
// 创建axios实例
|
||||
|
|
|
@ -68,7 +68,7 @@ import TypeDistributionWrap from "./profile/typeDistribution";
|
|||
import trendWrap from "./profile/trend";
|
||||
import MapWrap from "./profile/mapWrap";
|
||||
import MapWrapPersonal from "./profile/personalCenter";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/js/config";
|
||||
|
||||
import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app";
|
||||
export default {
|
||||
|
|
|
@ -68,7 +68,7 @@ import TypeDistributionWrap from "./profile/typeDistribution";
|
|||
import trendWrap from "./profile/trend";
|
||||
import MapWrap from "./profile/mapWrap";
|
||||
import MapWrapPersonal from "./profile/personalCenter";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/js/config";
|
||||
|
||||
import { getWarningAnalysis, homeCount, appProjectList } from "@/api/app";
|
||||
export default {
|
||||
|
|
|
@ -81,7 +81,7 @@ import TypeDistributionWrap from "./profile/typeDistribution";
|
|||
import trendWrap from "./profile/trend";
|
||||
import MapWrap from "./profile/mapWrap";
|
||||
import MapWrapPersonal from "./profile/personalCenter";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketAlarmBaseUrl } from "/public/js/config";
|
||||
import Cookies from "js-cookie";
|
||||
import { NextLoading } from '@/utils/loading';
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ import SelectTableWrap from "@/components/SelectTable/index";
|
|||
|
||||
import axios from "axios";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { basePlatformUrl } from '/public/config/env'
|
||||
import { basePlatformUrl } from '/public/js/config'
|
||||
import { getDeviceFunList, getDeviceCmdList } from "@/api/iot/device";
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ import InfoWrap from "./info";
|
|||
import ChildDevice from "./childDevice";
|
||||
import DeviceLog from "@/views/profile/DeviceDetailsView/deviceLog";
|
||||
import DeviceRunStartsWrap from "@/views/profile/DeviceRunStarts/index";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
import TriggerWrap from "@/views/profile/DeviceTrigger/index";
|
||||
export default {
|
||||
name: "DetailsWrap",
|
||||
|
|
|
@ -59,7 +59,7 @@ import InfoWrap from "./info";
|
|||
import DeviceLog from "@/views/profile/DeviceDetailsView/deviceLog";
|
||||
import ChildDevice from "./childDevice";
|
||||
import DeviceRunStartsWrap from "@/views/profile/DeviceRunStarts/index";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
export default {
|
||||
name: "DetailsWrap",
|
||||
props: ["sourceId"],
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import { getDeviceFunList, getDeviceCmdList } from "@/api/iot/device";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
import RunStateTable from "./runStateTable";
|
||||
export default {
|
||||
name: "RunStartsWrap",
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
|
||||
<script>
|
||||
import { listChildrenDevice, setSwitchControl } from "@/api/iot/device";
|
||||
import { iotWebSocketBaseUrl, devLiveWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl, devLiveWebSocketBaseUrl } from "/public/js/config";
|
||||
import SignalIntensity from "./signalIntensity";
|
||||
export default {
|
||||
name: "DeviceSelectNav",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import DeviceRunStartsWrap from "@/views/profile/DeviceRunStarts/index";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
import DeviceSelect from './deviceSelectNav'
|
||||
export default {
|
||||
name: "StateManagement",
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</template>
|
||||
<script>
|
||||
import { getDeviceFunList, getDeviceCmdList } from "@/api/iot/device";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
import RunStateTable from "./table";
|
||||
export default {
|
||||
name: "RunStartsWrap",
|
||||
|
|
|
@ -65,7 +65,7 @@ import InfoWrap from "./info";
|
|||
import DeviceLog from "@/views/profile/DeviceDetailsView/deviceLog";
|
||||
import ChildDevice from "./childDevice";
|
||||
import DeviceRunStartsWrap from "@/views/profile/DeviceRunStarts/index";
|
||||
import { iotWebSocketBaseUrl } from "/public/config/env";
|
||||
import { iotWebSocketBaseUrl } from "/public/js/config";
|
||||
import TriggerWrap from "@/views/profile/DeviceTrigger/index";
|
||||
export default {
|
||||
name: "DetailsWrap",
|
||||
|
|
Loading…
Reference in New Issue