Browse Source

Add storage papths to nginx config.

feat/rm-qa
Antun Franjin 4 years ago
parent
commit
71b9c93554
  1. 13
      dev/efc-shop/deployment.yaml
  2. 50
      dev/efc/deployment.yaml

13
dev/efc-shop/deployment.yaml

@ -99,6 +99,19 @@ data:
send_timeout 300s; send_timeout 300s;
} }
location /storage {
proxy_pass http://backend/storage;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
send_timeout 300s;
}
error_page 404 =200 /index.html; error_page 404 =200 /index.html;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';

50
dev/efc/deployment.yaml

@ -58,6 +58,9 @@ spec:
name: efc-backend name: efc-backend
protocol: TCP protocol: TCP
imagePullPolicy: Always imagePullPolicy: Always
volumeMounts:
- mountPath: /opt/efc/storage
name: efc-pv-dev
envFrom: envFrom:
- configMapRef: - configMapRef:
name: efc-dev-config-dev name: efc-dev-config-dev
@ -65,6 +68,25 @@ spec:
- name: nginx-conf - name: nginx-conf
configMap: configMap:
name: nginx-conf name: nginx-conf
- name: efc-pv-dev
persistentVolumeClaim:
claimName: efc-pvc-dev
---
# Persistent Volume Claim description
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: efc-pvc-dev
namespace: dev-environment
labels:
app: efc-dev
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
--- ---
apiVersion: v1 apiVersion: v1
@ -127,6 +149,34 @@ data:
send_timeout 300s; send_timeout 300s;
} }
location /storage {
proxy_pass http://backend/storage;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
send_timeout 300s;
}
location /admin {
proxy_pass http://backend/admin;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
send_timeout 300s;
}
error_page 404 =200 /index.html; error_page 404 =200 /index.html;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';

Loading…
Cancel
Save