diff --git a/proxy/kube.yml b/proxy/kube.yml new file mode 100644 index 00000000..073dcb20 --- /dev/null +++ b/proxy/kube.yml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: taxonium-proxy-deployment +spec: + replicas: 1 # Number of replicas + selector: + matchLabels: + app: taxonium-proxy + template: + metadata: + labels: + app: taxonium-proxy + spec: + containers: + - name: taxonium-proxy + image: theosanderson/taxonium_proxy:master + ports: + - containerPort: 3000 + +--- +apiVersion: v1 +kind: Service +metadata: + name: taxonium-proxy-service +spec: + selector: + app: taxonium-proxy + ports: + - protocol: TCP + port: 80 + targetPort: 3000 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: taxonium-proxy-ingress + annotations: + kubernetes.io/ingress.class: "nginx" # assuming you are using nginx ingress controller +spec: + rules: + - host: proxy2.taxonium.org + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: taxonium-proxy-service + port: + number: 80 \ No newline at end of file diff --git a/proxy/server.js b/proxy/server.js index b42005f2..ab5d3837 100644 --- a/proxy/server.js +++ b/proxy/server.js @@ -19,7 +19,9 @@ const corsOptions = { }; // Apply CORS -app.use(cors(corsOptions)); + +//app.use(cors(corsOptions)); + // Rate limiting middleware const limiter = rateLimit({