Skip to content

Commit

Permalink
errors finding
Browse files Browse the repository at this point in the history
  • Loading branch information
thakiyudheen committed Jul 13, 2024
1 parent df8598c commit 40e9877
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
58 changes: 58 additions & 0 deletions manifests/k8s/frontend-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: frontend-proxy-config
data:
nginx.conf: |
server {
listen 80;
server_name acecart.shop;
location / {
proxy_pass https://learn-up-elearning-frontend.vercel.app;
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_set_header X-Forwarded-Proto $scheme;
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-proxy
spec:
replicas: 1
selector:
matchLabels:
app: frontend-proxy
template:
metadata:
labels:
app: frontend-proxy
spec:
containers:
- name: nginx
image: nginx:1.19-alpine
ports:
- containerPort: 80
volumeMounts:
- name: config
mountPath: /etc/nginx/conf.d
readOnly: true
volumes:
- name: config
configMap:
name: frontend-proxy-config
---
apiVersion: v1
kind: Service
metadata:
name: frontend-proxy
spec:
selector:
app: frontend-proxy
ports:
- protocol: TCP
port: 80
targetPort: 80
9 changes: 7 additions & 2 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
}
"rewrites": [
{ "source": "/((?!api/).*)", "destination": "/" }
]
}



0 comments on commit 40e9877

Please sign in to comment.