diff --git a/dev/efc-shop/deployment.yaml b/dev/efc-shop/deployment.yaml index 153483f..e320436 100644 --- a/dev/efc-shop/deployment.yaml +++ b/dev/efc-shop/deployment.yaml @@ -99,6 +99,19 @@ data: 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; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; diff --git a/dev/efc/deployment.yaml b/dev/efc/deployment.yaml index 9e3cc41..c3cab1b 100644 --- a/dev/efc/deployment.yaml +++ b/dev/efc/deployment.yaml @@ -58,6 +58,9 @@ spec: name: efc-backend protocol: TCP imagePullPolicy: Always + volumeMounts: + - mountPath: /opt/efc/storage + name: efc-pv-dev envFrom: - configMapRef: name: efc-dev-config-dev @@ -65,6 +68,25 @@ spec: - name: nginx-conf configMap: 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 @@ -127,6 +149,34 @@ data: 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; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';