parent
2825d80ea1
commit
54e211723d
@ -0,0 +1,4 @@
|
||||
FROM nginx
|
||||
COPY dist/build/h5 /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
@ -0,0 +1,54 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
labels:
|
||||
app: $IMAGES
|
||||
name: $IMAGES
|
||||
namespace: yanxuan
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: $IMAGES
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 25%
|
||||
maxSurge: 25%
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: $IMAGES
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: aliyun-docker-hub
|
||||
containers:
|
||||
- image: '$REGISTRY/$DOCKERHUB_NAMESPACE/$IMAGES:$BUILD_NUMBER'
|
||||
name: app
|
||||
ports:
|
||||
- containerPort: $JAR_PORD
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: '0.5'
|
||||
memory: 500Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: $IMAGES
|
||||
namespace: yanxuan
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: $IMAGES
|
||||
type: ClusterIP
|
@ -0,0 +1,26 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name localhost default_server;
|
||||
client_max_body_size 200m;
|
||||
|
||||
location / {
|
||||
if ($request_filename ~* .*\.(?:htm|html)$) {
|
||||
add_header Cache-Control "no-store";
|
||||
}
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri @index ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
location @index {
|
||||
add_header Cache-Control "no-store" ;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri/index.html /index.html;
|
||||
}
|
||||
|
||||
error_page 405 =200 $uri;
|
||||
}
|
Loading…
Reference in new issue