mirror of https://github.com/codevalet/codevalet
parent
05f7fe4a76
commit
f71bf3d7a8
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
apiVersion: "v1"
|
||||
kind: "List"
|
||||
items:
|
||||
- apiVersion: "v1"
|
||||
kind: "ReplicationController"
|
||||
metadata:
|
||||
name: 'canary'
|
||||
labels:
|
||||
name: 'canary'
|
||||
spec:
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
name: 'canary'
|
||||
labels:
|
||||
name: 'canary'
|
||||
spec:
|
||||
containers:
|
||||
- name: 'canary'
|
||||
image: 'rtyler/codevalet-canary:latest'
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 9292
|
||||
env:
|
||||
- name: PRODUCTION
|
||||
value: 'true'
|
||||
- name: SENTRY_DSN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: webapp
|
||||
key: sentry
|
||||
- name: SENTRY_API_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: canary
|
||||
key: sentry
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9292
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 10
|
||||
|
||||
# vim: ft=yaml
|
|
@ -27,6 +27,16 @@ server {
|
|||
# Need to do this before the catch-all location below
|
||||
include /etc/nginx/monkeys.conf;
|
||||
|
||||
location /canary {
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://$canary:$canary_port;
|
||||
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $http_host;
|
||||
|
|
|
@ -11,6 +11,9 @@ cat > /etc/nginx/vars.conf << EOF
|
|||
|
||||
set \$webapp ${WEBAPP_SERVICE_HOST:-dummy-host};
|
||||
set \$webapp_port ${WEBAPP_SERVICE_PORT:-80};
|
||||
|
||||
set \$canary ${CANARY_SERVICE_HOST:-dummy-host};
|
||||
set \$canary_port ${CANARY_SERVICE_PORT:-80};
|
||||
EOF
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue