The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Logflare Docker Setup
Copple7ed2311fcc42
diff --git a/.gitignore b/.gitignoreindex c67a911193a..8e245433c33 100644--- a/.gitignore+++ b/.gitignore@@ -121,3 +121,5 @@ typings/**/supabase/.tempapps/new-docs/*++gcloud.json\ No newline at end of filediff --git a/docker/.env.example b/docker/.env.exampleindex 734367c90c4..3e78aeb4d0f 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -74,14 +74,15 @@ STUDIO_DEFAULT_PROJECT=Default ProjectSTUDIO_PORT=3000# replace if you intend to use Studio outside of localhost-SUPABASE_PUBLIC_URL=http://localhost:8000+SUPABASE_PUBLIC_URL=http://localhost:8000# Enable webp supportIMGPROXY_ENABLE_WEBP_DETECTION=true-# Configure Logflare API Calls-LOGFLARE_API_KEY=api-key-LOGFLARE_URL=http://localhost:54329-# Enable logging and observability in the UI-NEXT_PUBLIC_ENABLE_LOGS=true+############+# Logs - Configuration for Logflare+############++LOGFLARE_LOGGER_BACKEND_API_KEY=your-super-secret-and-long-logflare-key+LOGFLARE_HTTP_PORT=4001diff --git a/docker/docker-compose.yml b/docker/docker-compose.ymlindex 6c4247323ec..51f3beef7a6 100644--- a/docker/docker-compose.yml+++ b/docker/docker-compose.yml@@ -12,7 +12,13 @@ services:image: supabase/studio:20230216-e731b77restart: unless-stoppedhealthcheck:- test: [ "CMD", "node", "-e", "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})" ]+ test:+ [+ "CMD",+ "node",+ "-e",+ "require('http').get('http://localhost:3000/api/profile', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})"+ ]timeout: 5sinterval: 5sretries: 3@@ -53,10 +59,19 @@ services:container_name: supabase-authimage: supabase/gotrue:v2.47.0depends_on:- db: # Disable this if you are using an external Postgres database+ db:+ # Disable this if you are using an external Postgres databasecondition: service_healthyhealthcheck:- test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9999/health" ]+ test:+ [+ "CMD",+ "wget",+ "--no-verbose",+ "--tries=1",+ "--spider",+ "http://localhost:9999/health"+ ]timeout: 5sinterval: 5sretries: 3@@ -102,7 +117,8 @@ services:container_name: supabase-restimage: postgrest/postgrest:v10.1.2depends_on:- db: # Disable this if you are using an external Postgres database+ db:+ # Disable this if you are using an external Postgres databasecondition: service_healthyrestart: unless-stoppedenvironment:@@ -116,10 +132,17 @@ services:container_name: realtime-dev.supabase-realtimeimage: supabase/realtime:v2.5.1depends_on:- db: # Disable this if you are using an external Postgres database+ db:+ # Disable this if you are using an external Postgres databasecondition: service_healthyhealthcheck:- test: [ "CMD", "bash", "-c", "printf \\0 > /dev/tcp/localhost/4000" ]+ test:+ [+ "CMD",+ "bash",+ "-c",+ "printf \\0 > /dev/tcp/localhost/4000"+ ]timeout: 5sinterval: 5sretries: 3@@ -143,18 +166,69 @@ services:command: >sh -c "/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server"+ logs:+ container_name: supabase-logs+ image: supabase/logflare:1.0.0+ healthcheck:+ test:+ [++ "CMD",+ "wget",+ "--no-verbose",+ "--tries=1",+ "--spider",+ "http://localhost:4000/health"+ ]+ timeout: 5s+ interval: 5s+ retries: 3+ restart: unless-stopped+ depends_on:+ db:+ # Disable this if you are using an external Postgres database+ condition: service_healthy+ ports:+ - ${LOGFLARE_HTTP_PORT}:4000/tcp+ volumes:+ - type: bind+ source: ${PWD}/gcloud.json+ target: /opt/app/rel/logflare/bin/gcloud.json+ read_only: true+ environment:+ PHX_STATIC: PATH=/opt/app/rel/logflare/bin/priv/static+ MY_POD_IP: 127.0.0.1+ DB_USERNAME: supabase_admin+ DB_DATABASE: ${POSTGRES_DB}+ DB_HOSTNAME: ${POSTGRES_HOST}+ DB_PORT: ${POSTGRES_PORT}+ DB_PASSWORD: ${POSTGRES_PASSWORD}+ DB_NAME: ${POSTGRES_DB}+ LOGFLARE_SINGLE_TENANT: true+ GOOGLE_PROJECT_ID: logflare-dev-238720+ GOOGLE_PROJECT_NUMBER: 1023172132421+storage:container_name: supabase-storageimage: supabase/storage-api:v0.28.2depends_on:- db: # Disable this if you are using an external Postgres database+ db:+ # Disable this if you are using an external Postgres databasecondition: service_healthyrest:condition: service_startedimgproxy:condition: service_startedhealthcheck:- test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/status" ]+ test:+ [+ "CMD",+ "wget",+ "--no-verbose",+ "--tries=1",+ "--spider",+ "http://localhost:5000/status"+ ]timeout: 5sinterval: 5sretries: 3@@ -197,7 +271,8 @@ services:container_name: supabase-metaimage: supabase/postgres-meta:v0.60.7depends_on:- db: # Disable this if you are using an external Postgres database+ db:+ # Disable this if you are using an external Postgres databasecondition: service_healthyrestart: unless-stoppedenvironment: