Merge branch 'feature-BOX一期' of http://47.99.132.106:10081/wulin/qiuguo-iot into feature-BOX一期
This commit is contained in:
commit
cf3470d839
66
docker/modules/websocket/deploy/deploy.yaml
Normal file
66
docker/modules/websocket/deploy/deploy.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: iot-box-websocket-api
|
||||
name: iot-box-websocket-api
|
||||
namespace: qiuguo-iot #一定要写名称空间
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: iot-box-websocket-api
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 50%
|
||||
maxUnavailable: 50%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: iot-box-websocket-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码
|
||||
containers:
|
||||
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-websocket-api-SNAPSHOT-v1.0.0
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: 8080
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 30
|
||||
periodSeconds: 5
|
||||
imagePullPolicy: Always
|
||||
name: app
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 600Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: iot-box-websocket-api
|
||||
name: iot-box-websocket-api
|
||||
namespace: qiuguo-iot
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: iot-box-websocket-api
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
15
docker/modules/websocket/dockerfile
Normal file
15
docker/modules/websocket/dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER qiuguo
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/qiuguo
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/qiuguo
|
||||
# 指定路径
|
||||
WORKDIR /home/qiuguo
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/iot-box-websocket-api.jar /home/qiuguo/iot-box-websocket-api.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","iot-box-websocket-api.jar"]
|
||||
1
docker/modules/websocket/jar/ReadMe.md
Normal file
1
docker/modules/websocket/jar/ReadMe.md
Normal file
@ -0,0 +1 @@
|
||||
别删
|
||||
@ -44,13 +44,12 @@
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<!-- SpringBoot Actuator-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -10,10 +10,10 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址iot-nacos.qiuguo-iot
|
||||
server-addr: iot-nacos.qiuguo-iot:8848
|
||||
server-addr: 192.168.8.146:32470
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: iot-nacos.qiuguo-iot:8848
|
||||
server-addr: 192.168.8.146:32470
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
server:
|
||||
port: 9999
|
||||
port: 8080
|
||||
spring:
|
||||
profiles:
|
||||
# 环境配置
|
||||
@ -10,43 +10,12 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.8.101:8848
|
||||
server-addr: iot-nacos.qiuguo-iot:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.8.101:8848
|
||||
server-addr: iot-nacos.qiuguo-iot:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
redis:
|
||||
# cluster:
|
||||
# nodes:
|
||||
# - 127.0.0.1:7001
|
||||
# - 127.0.0.1:7002
|
||||
host: 192.168.8.101
|
||||
port: 6379
|
||||
password: 123456
|
||||
timeout: 5000
|
||||
r2dbc:
|
||||
#注意下面修改 easyorm相关也需要修改
|
||||
#url: r2dbc:postgresql://localhost:5432/postgres #postgresql请使用此配置
|
||||
url: r2dbc:mysql://172.24.218.235:3306/qiuguo_iot?ssl=false&serverZoneId=Asia/Shanghai # mysql请使用此配置
|
||||
#url: r2dbc:h2:file:///./data/h2db/jetlinks
|
||||
username: root
|
||||
password: '!pHuRvGKIsbiqcX1'
|
||||
easyorm:
|
||||
auto-ddl: false #是否根据实体类型更新数据库字段(增加、属性)
|
||||
default-schema: qiuguo_iot # 默认使用的schema. mysql时则为数据库名
|
||||
dialect: mysql # 方言: h2,mysql,postgresql
|
||||
logging:
|
||||
config: classpath:logback-${spring.profiles.active}.xml
|
||||
level:
|
||||
org.hswebframework: debug
|
||||
org.hswebframework.expands: error
|
||||
com.qiuguo.iot.data: debug #可以开启sql的日志打印
|
||||
device:
|
||||
checkTimeout: false #是否检测请求超时
|
||||
timeout: 120000 #超时时间 毫秒
|
||||
lac: #lac服务地址
|
||||
url: http://127.0.0.1:8866
|
||||
Loading…
x
Reference in New Issue
Block a user