Commit 70fabb75 authored by zuoliyuan's avatar zuoliyuan
parents 06b41c3d 98bde803
FROM harbor.ebd.nercel.com/demp/nginx
MAINTAINER ruanhx@nercel.com
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
EXPOSE 80
ADD devops/default.conf /etc/nginx/conf.d/default.conf
ADD unpackage/dist/build/web/ /usr/share/nginx/html
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
client_max_body_size 512m;
location / {
try_files $uri $uri/ /index.html;
}
# 接口
location /api/ {
proxy_pass http://172.0.107.76:31001;
proxy_read_timeout 180s;
}
# location /manage {
# try_files $uri $uri/ /manage/index.html;
# }
# 大屏前端
#location /DataV {
# try_files $uri $uri/ /DataV/index.html;
#}
# 报表前端
#location /Report {
# try_files $uri $uri/ /Report/index.html;
#}
# 数据报表接口配置
#location /ReportServer/ {
# proxy_pass http://172.0.107.76:31003/;
#}
# websocket
location ^~ /websocket {
proxy_pass http://172.0.107.76:31001/message/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: dj-app
component: dj-app
tier: backend
name: dj-app
namespace: dangjian
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app: dj-app
component: dj-app
tier: backend
template:
metadata:
labels:
app: dj-app
component: dj-app
tier: backend
annotations:
kubesphere.io/imagepullsecrets: '{"dj-app": "harbor-secret"}'
spec:
containers:
- env:
image: $REGISTRY/$DOCKERHUB_NAMESPACE/$APP_NAME:$BRANCH_NAME$BUILD_NUMBER
readinessProbe:
exec: # 定义 ls /example 命令
command:
- ls
- /usr/share/nginx/html
imagePullPolicy: Always
name: dj-app
ports:
- containerPort: 80
protocol: TCP
resources:
limits:
cpu: 800m
memory: 1024Mi
requests:
cpu: 300m
memory: 500Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullSecrets:
- name: harbor-secret
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment