Add nginx maintenance and test locally

This commit is contained in:
Matt Rider 2019-07-03 12:13:45 -03:00
parent e04ab842bd
commit 438bb36e90
6 changed files with 65 additions and 14 deletions

View File

@ -0,0 +1,2 @@
FROM nginx:alpine
COPY ./maintenance.html /usr/share/nginx/html/index.html

View File

@ -0,0 +1,37 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: maintenance
namespace: human-connection
spec:
replicas: 2
minReadySeconds: 15
progressDeadlineSeconds: 60
selector:
matchLabels:
human-connection.org/selector: deployment-human-connection-nginx
template:
metadata:
labels:
human-connection.org/commit: COMMIT
human-connection.org/selector: deployment-human-connection-nginx
name: maintenance
spec:
containers:
- name: web
envFrom:
- configMapRef:
name: configmap
- secretRef:
name: human-connection
env:
- name: HOST
value: 0.0.0.0
image: humanconnection/maintenance:latest
ports:
- containerPort: 80
resources: {}
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
status: {}

View File

@ -0,0 +1,4 @@
<h1>
At the moment we are doing some scheduled maintenance, please try again later.
Any questions or concerns, send an email to info@human-connection.org
</h1>

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: maintenance
namespace: human-connection
labels:
human-connection.org/selector: deployment-human-connection-nginx
spec:
ports:
- name: web
port: 80
targetPort: 80
selector:
human-connection.org/selector: deployment-human-connection-nginx

View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: nitro-web
namespace: human-connection
labels:
human-connection.org/selector: deployment-human-connection-web
spec:
ports:
- name: web
port: 3000
targetPort: 3000
selector:
human-connection.org/selector: nginx

View File

@ -41,6 +41,14 @@ services:
context: neo4j context: neo4j
networks: networks:
- hc-network - hc-network
maintenance:
image: humanconnection/maintenance:latest
build:
context: deployment/human-connection/maintenance
networks:
- hc-network
ports:
- 80:80
networks: networks:
hc-network: hc-network: