[add]添加user相关的deploy
This commit is contained in:
parent
edcd8fc4be
commit
90ad098056
66
docker/modules/user/deploy/deploy.yaml
Normal file
66
docker/modules/user/deploy/deploy.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: iot-box-user-api
|
||||
name: iot-box-user-api
|
||||
namespace: qiuguo-iot #一定要写名称空间
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: iot-box-user-api
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 50%
|
||||
maxUnavailable: 50%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: iot-box-user-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: aliyun-hub-register #提前在项目下配置访问阿里云的账号密码
|
||||
containers:
|
||||
- image: $REGISTRY/$DOCKERHUB_NAMESPACE/qiuguo-iot:iot-box-user-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-user-api
|
||||
name: iot-box-user-api
|
||||
namespace: qiuguo-iot
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: iot-box-user-api
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
15
docker/modules/user/dockerfile
Normal file
15
docker/modules/user/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-user-api.jar /home/qiuguo/iot-box-user-api.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","iot-box-user-api.jar"]
|
||||
1
docker/modules/user/jar/ReadMe.md
Normal file
1
docker/modules/user/jar/ReadMe.md
Normal file
@ -0,0 +1 @@
|
||||
别删
|
||||
Loading…
x
Reference in New Issue
Block a user