Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove PostgREST (#41299)
Marshall Bowersf5ad4c8bd905
diff --git a/Procfile.postgrest b/Procfile.postgrestdeleted file mode 100644index acab58e086c..00000000000--- a/Procfile.postgrest+++ /dev/null@@ -1,2 +0,0 @@-app: postgrest crates/collab/postgrest_app.conf-llm: postgrest crates/collab/postgrest_llm.confdiff --git a/Procfile.web b/Procfile.webindex 81405551449..63190fc2ee1 100644--- a/Procfile.web+++ b/Procfile.web@@ -1,2 +1 @@-postgrest_llm: postgrest crates/collab/postgrest_llm.confwebsite: cd ../zed.dev; npm run dev -- --port=3000diff --git a/compose.yml b/compose.ymlindex 00a5780b597..cee63e968b2 100644--- a/compose.yml+++ b/compose.yml@@ -33,32 +33,6 @@ services:volumes:- ./livekit.yaml:/livekit.yaml- postgrest_app:- image: docker.io/postgrest/postgrest- container_name: postgrest_app- ports:- - 8081:8081- environment:- PGRST_DB_URI: postgres://postgres@postgres:5432/zed- volumes:- - ./crates/collab/postgrest_app.conf:/etc/postgrest.conf- command: postgrest /etc/postgrest.conf- depends_on:- - postgres-- postgrest_llm:- image: docker.io/postgrest/postgrest- container_name: postgrest_llm- ports:- - 8082:8082- environment:- PGRST_DB_URI: postgres://postgres@postgres:5432/zed_llm- volumes:- - ./crates/collab/postgrest_llm.conf:/etc/postgrest.conf- command: postgrest /etc/postgrest.conf- depends_on:- - postgres-stripe-mock:image: docker.io/stripe/stripe-mock:v0.178.0ports:diff --git a/crates/collab/k8s/postgrest.template.yml b/crates/collab/k8s/postgrest.template.ymldeleted file mode 100644index 4819408bffd..00000000000--- a/crates/collab/k8s/postgrest.template.yml+++ /dev/null@@ -1,175 +0,0 @@-----kind: Service-apiVersion: v1-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: postgrest- annotations:- service.beta.kubernetes.io/do-loadbalancer-name: "postgrest-${ZED_KUBE_NAMESPACE}"- service.beta.kubernetes.io/do-loadbalancer-tls-ports: "443"- service.beta.kubernetes.io/do-loadbalancer-certificate-id: ${ZED_DO_CERTIFICATE_ID}- service.beta.kubernetes.io/do-loadbalancer-disable-lets-encrypt-dns-records: "true"-spec:- type: LoadBalancer- selector:- app: nginx- ports:- - name: web- protocol: TCP- port: 443- targetPort: 8080------apiVersion: apps/v1-kind: Deployment-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: nginx-spec:- replicas: 1- selector:- matchLabels:- app: nginx- template:- metadata:- labels:- app: nginx- spec:- containers:- - name: nginx- image: nginx:latest- ports:- - containerPort: 8080- protocol: TCP- volumeMounts:- - name: nginx-config- mountPath: /etc/nginx/nginx.conf- subPath: nginx.conf- volumes:- - name: nginx-config- configMap:- name: nginx-config------apiVersion: v1-kind: ConfigMap-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: nginx-config-data:- nginx.conf: |- events {}-- http {- server {- listen 8080;-- location /app/ {- proxy_pass http://postgrest-app:8080/;- }-- location /llm/ {- proxy_pass http://postgrest-llm:8080/;- }- }- }------apiVersion: v1-kind: Service-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: postgrest-app-spec:- selector:- app: postgrest-app- ports:- - protocol: TCP- port: 8080- targetPort: 8080------apiVersion: v1-kind: Service-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: postgrest-llm-spec:- selector:- app: postgrest-llm- ports:- - protocol: TCP- port: 8080- targetPort: 8080------apiVersion: apps/v1-kind: Deployment-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: postgrest-app-spec:- replicas: 1- selector:- matchLabels:- app: postgrest-app- template:- metadata:- labels:- app: postgrest-app- spec:- containers:- - name: postgrest- image: "postgrest/postgrest"- ports:- - containerPort: 8080- protocol: TCP- env:- - name: PGRST_SERVER_PORT- value: "8080"- - name: PGRST_DB_URI- valueFrom:- secretKeyRef:- name: database- key: url- - name: PGRST_JWT_SECRET- valueFrom:- secretKeyRef:- name: postgrest- key: jwt_secret------apiVersion: apps/v1-kind: Deployment-metadata:- namespace: ${ZED_KUBE_NAMESPACE}- name: postgrest-llm-spec:- replicas: 1- selector:- matchLabels:- app: postgrest-llm- template:- metadata:- labels:- app: postgrest-llm- spec:- containers:- - name: postgrest- image: "postgrest/postgrest"- ports:- - containerPort: 8080- protocol: TCP- env:- - name: PGRST_SERVER_PORT- value: "8080"- - name: PGRST_DB_URI- valueFrom:- secretKeyRef:- name: llm-database- key: url- - name: PGRST_JWT_SECRET- valueFrom:- secretKeyRef:- name: postgrest- key: jwt_secretdiff --git a/crates/collab/postgrest_app.conf b/crates/collab/postgrest_app.confdeleted file mode 100644index 5d3b0e65b73..00000000000--- a/crates/collab/postgrest_app.conf+++ /dev/null@@ -1,4 +0,0 @@-db-uri = "postgres://postgres@localhost/zed"-server-port = 8081-jwt-secret = "the-postgrest-jwt-secret-for-authorization"-log-level = "info"diff --git a/crates/collab/postgrest_llm.conf b/crates/collab/postgrest_llm.confdeleted file mode 100644index 3a0cdfa4933..00000000000--- a/crates/collab/postgrest_llm.conf+++ /dev/null@@ -1,4 +0,0 @@-db-uri = "postgres://postgres@localhost/zed_llm"-server-port = 8082-jwt-secret = "the-postgrest-jwt-secret-for-authorization"-log-level = "info"diff --git a/script/deploy-postgrest b/script/deploy-postgrestdeleted file mode 100755index ca8f3686468..00000000000--- a/script/deploy-postgrest+++ /dev/null@@ -1,20 +0,0 @@-#!/usr/bin/env bash--set -eu-source script/lib/deploy-helpers.sh--if [[ $# != 1 ]]; then- echo "Usage: $0 <production|staging> (postgrest not needed on preview or nightly)"- exit 1-fi-environment=$1--export_vars_for_environment ${environment}--export ZED_DO_CERTIFICATE_ID=$(doctl compute certificate list --format ID --no-header)-export ZED_KUBE_NAMESPACE=${environment}--target_zed_kube_cluster-envsubst < crates/collab/k8s/postgrest.template.yml | kubectl apply -f ---echo "deployed postgrest"