From 395a68133d988a9d5eec7f218f8d3f0bc5eae696 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 19 Aug 2024 20:50:45 -0400 Subject: [PATCH] Add Postgrest to Docker Compose (#16498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR adds two Postgrest containers—one for the app database and one for the LLM database—to the Docker Compose cluster. Also fixed an issue where `postgres_app.conf` and `postgres_llm.conf` had been switched. Release Notes: - N/A --- compose.yml | 26 ++++++++++++++++++++++++++ crates/collab/postgrest_app.conf | 4 ++-- crates/collab/postgrest_llm.conf | 4 ++-- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/compose.yml b/compose.yml index 28f091fb6f..4cd4c86df6 100644 --- a/compose.yml +++ b/compose.yml @@ -33,5 +33,31 @@ services: volumes: - ./livekit.yaml:/livekit.yaml + postgrest_app: + image: 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: 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 + volumes: postgres_data: diff --git a/crates/collab/postgrest_app.conf b/crates/collab/postgrest_app.conf index 3a0cdfa493..5d3b0e65b7 100644 --- a/crates/collab/postgrest_app.conf +++ b/crates/collab/postgrest_app.conf @@ -1,4 +1,4 @@ -db-uri = "postgres://postgres@localhost/zed_llm" -server-port = 8082 +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.conf index 5d3b0e65b7..3a0cdfa493 100644 --- a/crates/collab/postgrest_llm.conf +++ b/crates/collab/postgrest_llm.conf @@ -1,4 +1,4 @@ -db-uri = "postgres://postgres@localhost/zed" -server-port = 8081 +db-uri = "postgres://postgres@localhost/zed_llm" +server-port = 8082 jwt-secret = "the-postgrest-jwt-secret-for-authorization" log-level = "info"