mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Merge 1b7b2eb0a4 into 60dfadf036
This commit is contained in:
commit
c0e8c339f1
1 changed files with 172 additions and 77 deletions
|
|
@ -22,7 +22,7 @@ services:
|
|||
- KONG_DECLARATIVE_CONFIG=/home/kong/kong.yml
|
||||
# https://github.com/supabase/cli/issues/14
|
||||
- KONG_DNS_ORDER=LAST,A,CNAME
|
||||
- KONG_PLUGINS=request-transformer,cors,key-auth,acl,basic-auth
|
||||
- KONG_PLUGINS=request-transformer,cors,key-auth,acl,basic-auth,request-termination
|
||||
- KONG_NGINX_PROXY_PROXY_BUFFER_SIZE=160k
|
||||
- KONG_NGINX_PROXY_PROXY_BUFFERS=64 160k
|
||||
- SUPABASE_ANON_KEY=${SERVICE_SUPABASEANON_KEY}
|
||||
|
|
@ -33,7 +33,7 @@ services:
|
|||
- 'KONG_STORAGE_WRITE_TIMEOUT=${KONG_STORAGE_WRITE_TIMEOUT:-3600}'
|
||||
- 'KONG_STORAGE_READ_TIMEOUT=${KONG_STORAGE_READ_TIMEOUT:-3600}'
|
||||
- 'KONG_STORAGE_REQUEST_BUFFERING=${KONG_STORAGE_REQUEST_BUFFERING:-false}'
|
||||
- 'KONG_STORAGE_RESPONSE_BUFFERING=${KONG_STORAGE_RESPONSE_BUFFERING:-false}'
|
||||
- 'KONG_STORAGE_RESPONSE_BUFFERING=${KONG_STORAGE_RESPONSE_BUFFERING:-false}'
|
||||
volumes:
|
||||
# https://github.com/supabase/supabase/issues/12661
|
||||
- type: bind
|
||||
|
|
@ -275,6 +275,36 @@ services:
|
|||
allow:
|
||||
- admin
|
||||
|
||||
## Block access to /api/mcp
|
||||
- name: mcp-blocker
|
||||
_comment: 'Block direct access to /api/mcp'
|
||||
url: http://supabase-studio:3000/api/mcp
|
||||
routes:
|
||||
- name: mcp-blocker-route
|
||||
strip_path: true
|
||||
paths:
|
||||
- /api/mcp
|
||||
plugins:
|
||||
- name: request-termination
|
||||
config:
|
||||
status_code: 403
|
||||
message: "Access is forbidden."
|
||||
|
||||
## MCP endpoint - local access
|
||||
- name: mcp
|
||||
_comment: 'MCP: /mcp -> http://supabase-studio:3000/api/mcp (local access)'
|
||||
url: http://supabase-studio:3000/api/mcp
|
||||
routes:
|
||||
- name: mcp
|
||||
strip_path: true
|
||||
paths:
|
||||
- /mcp
|
||||
plugins:
|
||||
- name: request-termination
|
||||
config:
|
||||
status_code: 403
|
||||
message: "Access is forbidden."
|
||||
|
||||
## Protected Dashboard - catch all remaining routes
|
||||
- name: dashboard
|
||||
_comment: 'Studio: /* -> http://studio:3000/*'
|
||||
|
|
@ -290,7 +320,7 @@ services:
|
|||
config:
|
||||
hide_credentials: true
|
||||
supabase-studio:
|
||||
image: supabase/studio:2026.01.07-sha-037e5f9
|
||||
image: supabase/studio:2026.02.16-sha-26c615c
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
|
|
@ -310,7 +340,8 @@ services:
|
|||
- STUDIO_PG_META_URL=http://supabase-meta:8080
|
||||
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- POSTGRES_HOST=${POSTGRES_HOST:-supabase-db}
|
||||
- CURRENT_CLI_VERSION=2.67.1
|
||||
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
|
||||
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
||||
|
||||
- DEFAULT_ORGANIZATION_NAME=${STUDIO_DEFAULT_ORGANIZATION:-Default Organization}
|
||||
- DEFAULT_PROJECT_NAME=${STUDIO_DEFAULT_PROJECT:-Default Project}
|
||||
|
|
@ -320,10 +351,12 @@ services:
|
|||
- SUPABASE_ANON_KEY=${SERVICE_SUPABASEANON_KEY}
|
||||
- SUPABASE_SERVICE_KEY=${SERVICE_SUPABASESERVICE_KEY}
|
||||
- AUTH_JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
- PG_META_CRYPTO_KEY=${SERVICE_PASSWORD_PGMETACRYPTO}
|
||||
|
||||
- LOGFLARE_API_KEY=${SERVICE_PASSWORD_LOGFLARE}
|
||||
- LOGFLARE_PUBLIC_ACCESS_TOKEN=${SERVICE_PASSWORD_LOGFLARE}
|
||||
- LOGFLARE_PRIVATE_ACCESS_TOKEN=${SERVICE_PASSWORD_LOGFLARE_PRIVATE}
|
||||
- LOGFLARE_URL=http://supabase-analytics:4000
|
||||
- 'SUPABASE_PUBLIC_API=${SERVICE_URL_SUPABASEKONG}'
|
||||
# Next.js client-side environment variables (required for browser access)
|
||||
- 'NEXT_PUBLIC_SUPABASE_URL=${SERVICE_URL_SUPABASEKONG}'
|
||||
- NEXT_PUBLIC_SUPABASE_ANON_KEY=${SERVICE_SUPABASEANON_KEY}
|
||||
|
|
@ -333,8 +366,13 @@ services:
|
|||
# Uncomment to use Big Query backend for analytics
|
||||
# NEXT_ANALYTICS_BACKEND_PROVIDER=bigquery
|
||||
- 'OPENAI_API_KEY=${OPENAI_API_KEY}'
|
||||
- SNIPPETS_MANAGEMENT_FOLDER=/app/snippets
|
||||
- EDGE_FUNCTIONS_MANAGEMENT_FOLDER=/app/edge-functions
|
||||
volumes:
|
||||
- ./volumes/snippets:/app/snippets
|
||||
- ./volumes/functions:/app/edge-functions
|
||||
supabase-db:
|
||||
image: supabase/postgres:15.8.1.048
|
||||
image: supabase/postgres:15.8.1.085
|
||||
healthcheck:
|
||||
test: pg_isready -U postgres -h 127.0.0.1
|
||||
interval: 5s
|
||||
|
|
@ -359,6 +397,7 @@ services:
|
|||
- POSTGRES_DB=${POSTGRES_DB:-postgres}
|
||||
- JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
- JWT_EXP=${JWT_EXPIRY:-3600}
|
||||
- ANALYTICS_RETENTION_DAYS=${ANALYTICS_RETENTION_DAYS:-7}
|
||||
volumes:
|
||||
- supabase-db-data:/var/lib/postgresql/data
|
||||
- type: bind
|
||||
|
|
@ -628,12 +667,55 @@ services:
|
|||
\c _supabase
|
||||
create schema if not exists _analytics;
|
||||
alter schema _analytics owner to :pguser;
|
||||
|
||||
-- Analytics log retention cleanup function
|
||||
-- Deletes log_events older than app.analytics_retention_days (default: 7 days)
|
||||
CREATE OR REPLACE FUNCTION _analytics.cleanup_old_logs()
|
||||
RETURNS void AS $$
|
||||
DECLARE
|
||||
tbl text;
|
||||
days int;
|
||||
BEGIN
|
||||
days := COALESCE(nullif(current_setting('app.analytics_retention_days', true), '')::int, 7);
|
||||
FOR tbl IN
|
||||
SELECT tablename FROM pg_tables
|
||||
WHERE schemaname = '_analytics' AND tablename LIKE 'log_events_%'
|
||||
LOOP
|
||||
EXECUTE format(
|
||||
'DELETE FROM _analytics.%I WHERE timestamp < NOW() - INTERVAL ''%s days''',
|
||||
tbl, days
|
||||
);
|
||||
END LOOP;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql SECURITY DEFINER;
|
||||
|
||||
\c postgres
|
||||
- type: bind
|
||||
source: ./volumes/db/analytics-retention.sh
|
||||
target: /docker-entrypoint-initdb.d/init-scripts/99-analytics-retention.sh
|
||||
content: |
|
||||
#!/bin/bash
|
||||
set -e
|
||||
DAYS=${ANALYTICS_RETENTION_DAYS:-7}
|
||||
|
||||
# Set retention days as a Postgres custom setting
|
||||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "_supabase" \
|
||||
-c "ALTER DATABASE _supabase SET app.analytics_retention_days TO '$DAYS';"
|
||||
|
||||
# Schedule nightly cleanup at 03:00 UTC using pg_cron
|
||||
psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "postgres" -c "
|
||||
SELECT cron.schedule_in_database(
|
||||
'cleanup-analytics-logs',
|
||||
'0 3 * * *',
|
||||
'SELECT _analytics.cleanup_old_logs()',
|
||||
'_supabase'
|
||||
) ON CONFLICT DO NOTHING;
|
||||
" || true
|
||||
# Use named volume to persist pgsodium decryption key between restarts
|
||||
- supabase-db-config:/etc/postgresql-custom
|
||||
|
||||
supabase-analytics:
|
||||
image: supabase/logflare:1.4.0
|
||||
image: supabase/logflare:1.31.2
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "http://127.0.0.1:4000/health"]
|
||||
timeout: 5s
|
||||
|
|
@ -655,11 +737,10 @@ services:
|
|||
- DB_PORT=${POSTGRES_PORT:-5432}
|
||||
- DB_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- DB_SCHEMA=_analytics
|
||||
- LOGFLARE_API_KEY=${SERVICE_PASSWORD_LOGFLARE}
|
||||
- LOGFLARE_PUBLIC_ACCESS_TOKEN=${SERVICE_PASSWORD_LOGFLARE}
|
||||
- LOGFLARE_PRIVATE_ACCESS_TOKEN=${SERVICE_PASSWORD_LOGFLARE_PRIVATE}
|
||||
- LOGFLARE_SINGLE_TENANT=true
|
||||
- LOGFLARE_SINGLE_TENANT_MODE=true
|
||||
- LOGFLARE_SUPABASE_MODE=true
|
||||
- LOGFLARE_MIN_CLUSTER_SIZE=1
|
||||
|
||||
# Comment variables to use Big Query backend for analytics
|
||||
- POSTGRES_BACKEND_URL=postgresql://supabase_admin:${SERVICE_PASSWORD_POSTGRES}@${POSTGRES_HOSTNAME:-supabase-db}:${POSTGRES_PORT:-5432}/_supabase
|
||||
|
|
@ -670,7 +751,7 @@ services:
|
|||
# GOOGLE_PROJECT_ID=${GOOGLE_PROJECT_ID}
|
||||
# GOOGLE_PROJECT_NUMBER=${GOOGLE_PROJECT_NUMBER}
|
||||
supabase-vector:
|
||||
image: timberio/vector:0.28.1-alpine
|
||||
image: timberio/vector:0.53.0-alpine
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
|
|
@ -727,7 +808,7 @@ services:
|
|||
rest: 'starts_with(string!(.appname), "supabase-rest")'
|
||||
realtime: 'starts_with(string!(.appname), "realtime-dev")'
|
||||
storage: 'starts_with(string!(.appname), "supabase-storage")'
|
||||
functions: 'starts_with(string!(.appname), "supabase-functions")'
|
||||
functions: 'starts_with(string!(.appname), "supabase-edge-functions")'
|
||||
db: 'starts_with(string!(.appname), "supabase-db")'
|
||||
# Ignores non nginx errors since they are related with kong booting up
|
||||
kong_logs:
|
||||
|
|
@ -741,10 +822,13 @@ services:
|
|||
.metadata.request.headers.referer = req.referer
|
||||
.metadata.request.headers.user_agent = req.agent
|
||||
.metadata.request.headers.cf_connecting_ip = req.client
|
||||
.metadata.request.method = req.method
|
||||
.metadata.request.path = req.path
|
||||
.metadata.request.protocol = req.protocol
|
||||
.metadata.response.status_code = req.status
|
||||
url, split_err = split(req.request, " ")
|
||||
if split_err == null {
|
||||
.metadata.request.method = url[0]
|
||||
.metadata.request.path = url[1]
|
||||
.metadata.request.protocol = url[2]
|
||||
}
|
||||
}
|
||||
if err != null {
|
||||
abort
|
||||
|
|
@ -793,14 +877,20 @@ services:
|
|||
parsed, err = parse_regex(.event_message, r'^(?P<time>.*): (?P<msg>.*)$')
|
||||
if err == null {
|
||||
.event_message = parsed.msg
|
||||
.timestamp = to_timestamp!(parsed.time)
|
||||
.timestamp = parse_timestamp!(value: parsed.time, format: "%d/%b/%Y:%H:%M:%S %z")
|
||||
.metadata.host = .project
|
||||
}
|
||||
# Filter out healthcheck logs from Realtime
|
||||
realtime_logs_filtered:
|
||||
type: filter
|
||||
inputs:
|
||||
- router.realtime
|
||||
condition: '!contains(string!(.event_message), "/health")'
|
||||
# Realtime logs are structured so we parse the severity level using regex (ignore time because it has no date)
|
||||
realtime_logs:
|
||||
type: remap
|
||||
inputs:
|
||||
- router.realtime
|
||||
- realtime_logs_filtered
|
||||
source: |-
|
||||
.metadata.project = del(.project)
|
||||
.metadata.external_id = .metadata.project
|
||||
|
|
@ -825,6 +915,13 @@ services:
|
|||
.metadata.context[0].host = parsed.hostname
|
||||
.metadata.context[0].pid = parsed.pid
|
||||
}
|
||||
# Function logs are unstructured messages on stderr
|
||||
functions_logs:
|
||||
type: remap
|
||||
inputs:
|
||||
- router.functions
|
||||
source: |-
|
||||
.metadata.project_ref = del(.project)
|
||||
# Postgres logs some messages to stderr which we map to warning severity level
|
||||
db_logs:
|
||||
type: remap
|
||||
|
|
@ -839,8 +936,8 @@ services:
|
|||
if err != null || parsed == null {
|
||||
.metadata.parsed.error_severity = "info"
|
||||
}
|
||||
if parsed != null {
|
||||
.metadata.parsed.error_severity = parsed.level
|
||||
if parsed.level != null {
|
||||
.metadata.parsed.error_severity = parsed.level
|
||||
}
|
||||
if .metadata.parsed.error_severity == "info" {
|
||||
.metadata.parsed.error_severity = "log"
|
||||
|
|
@ -856,8 +953,11 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=gotrue.logs.prod&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=gotrue.logs.prod'
|
||||
logflare_realtime:
|
||||
type: 'http'
|
||||
inputs:
|
||||
|
|
@ -866,8 +966,11 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=realtime.logs.prod&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=realtime.logs.prod'
|
||||
logflare_rest:
|
||||
type: 'http'
|
||||
inputs:
|
||||
|
|
@ -876,8 +979,11 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=postgREST.logs.prod&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=postgREST.logs.prod'
|
||||
logflare_db:
|
||||
type: 'http'
|
||||
inputs:
|
||||
|
|
@ -886,21 +992,24 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
# We must route the sink through kong because ingesting logs before logflare is fully initialised will
|
||||
# lead to broken queries from studio. This works by the assumption that containers are started in the
|
||||
# following order: vector > db > logflare > kong
|
||||
uri: 'http://supabase-kong:8000/analytics/v1/api/logs?source_name=postgres.logs&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=postgres.logs'
|
||||
logflare_functions:
|
||||
type: 'http'
|
||||
inputs:
|
||||
- router.functions
|
||||
- functions_logs
|
||||
encoding:
|
||||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=deno-relay-logs&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=deno-relay-logs'
|
||||
logflare_storage:
|
||||
type: 'http'
|
||||
inputs:
|
||||
|
|
@ -909,8 +1018,11 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=storage.logs.prod.2&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=storage.logs.prod.2'
|
||||
logflare_kong:
|
||||
type: 'http'
|
||||
inputs:
|
||||
|
|
@ -920,16 +1032,19 @@ services:
|
|||
codec: 'json'
|
||||
method: 'post'
|
||||
request:
|
||||
retry_max_duration_secs: 10
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=cloudflare.logs.prod&api_key=${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
retry_max_duration_secs: 30
|
||||
retry_initial_backoff_secs: 1
|
||||
headers:
|
||||
x-api-key: '${LOGFLARE_API_KEY?LOGFLARE_API_KEY is required}'
|
||||
uri: 'http://supabase-analytics:4000/api/logs?source_name=cloudflare.logs.prod'
|
||||
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- LOGFLARE_API_KEY=${SERVICE_PASSWORD_LOGFLARE}
|
||||
command: ["--config", "etc/vector/vector.yml"]
|
||||
command: ["--config", "/etc/vector/vector.yml"]
|
||||
|
||||
supabase-rest:
|
||||
image: postgrest/postgrest:v12.2.12
|
||||
image: postgrest/postgrest:v14.5
|
||||
depends_on:
|
||||
supabase-db:
|
||||
# Disable this if you are using an external Postgres database
|
||||
|
|
@ -947,7 +1062,7 @@ services:
|
|||
command: "postgrest"
|
||||
exclude_from_hc: true
|
||||
supabase-auth:
|
||||
image: supabase/gotrue:v2.174.0
|
||||
image: supabase/gotrue:v2.186.0
|
||||
depends_on:
|
||||
supabase-db:
|
||||
# Disable this if you are using an external Postgres database
|
||||
|
|
@ -1038,7 +1153,7 @@ services:
|
|||
|
||||
realtime-dev:
|
||||
# This container name looks inconsistent but is correct because realtime constructs tenant id by parsing the subdomain
|
||||
image: supabase/realtime:v2.34.47
|
||||
image: supabase/realtime:v2.76.5
|
||||
container_name: realtime-dev.supabase-realtime
|
||||
depends_on:
|
||||
supabase-db:
|
||||
|
|
@ -1072,11 +1187,8 @@ services:
|
|||
- DB_AFTER_CONNECT_QUERY=SET search_path TO _realtime
|
||||
- DB_ENC_KEY=supabaserealtime
|
||||
- API_JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
- FLY_ALLOC_ID=fly123
|
||||
- FLY_APP_NAME=realtime
|
||||
- SECRET_KEY_BASE=${SECRET_PASSWORD_REALTIME}
|
||||
- ERL_AFLAGS=-proto_dist inet_tcp
|
||||
- ENABLE_TAILSCALE=false
|
||||
- DNS_NODES=''
|
||||
- RLIMIT_NOFILE=10000
|
||||
- APP_NAME=realtime
|
||||
|
|
@ -1084,6 +1196,7 @@ services:
|
|||
- LOG_LEVEL=error
|
||||
- RUN_JANITOR=true
|
||||
- JANITOR_INTERVAL=60000
|
||||
- DISABLE_HEALTHCHECK_LOGGING=true
|
||||
command: >
|
||||
sh -c "/app/bin/migrate && /app/bin/realtime eval 'Realtime.Release.seeds(Realtime.Repo)' && /app/bin/server"
|
||||
supabase-minio:
|
||||
|
|
@ -1121,7 +1234,7 @@ services:
|
|||
exit 0
|
||||
|
||||
supabase-storage:
|
||||
image: supabase/storage-api:v1.14.6
|
||||
image: supabase/storage-api:v1.37.8
|
||||
depends_on:
|
||||
supabase-db:
|
||||
# Disable this if you are using an external Postgres database
|
||||
|
|
@ -1160,7 +1273,7 @@ services:
|
|||
- UPLOAD_FILE_SIZE_LIMIT=524288000
|
||||
- UPLOAD_FILE_SIZE_LIMIT_STANDARD=524288000
|
||||
- UPLOAD_SIGNED_URL_EXPIRATION_TIME=120
|
||||
- TUS_URL_PATH=upload/resumable
|
||||
- TUS_URL_PATH=/upload/resumable
|
||||
- TUS_MAX_SIZE=3600000
|
||||
- ENABLE_IMAGE_TRANSFORMATION=true
|
||||
- IMGPROXY_URL=http://imgproxy:8080
|
||||
|
|
@ -1168,46 +1281,30 @@ services:
|
|||
- DATABASE_SEARCH_PATH=storage
|
||||
- NODE_ENV=production
|
||||
- REQUEST_ALLOW_X_FORWARDED_PATH=true
|
||||
|
||||
# - ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogImFub24iLAogICJpc3MiOiAic3VwYWJhc2UiLAogICJpYXQiOiAxNzA4OTg4NDAwLAogICJleHAiOiAxODY2ODQxMjAwCn0.jCDqsoXGT58JnAjf27KOowNQsokkk0aR7rdbGG18P-8
|
||||
# - SERVICE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogInNlcnZpY2Vfcm9sZSIsCiAgImlzcyI6ICJzdXBhYmFzZSIsCiAgImlhdCI6IDE3MDg5ODg0MDAsCiAgImV4cCI6IDE4NjY4NDEyMDAKfQ.GA7yF2BmqTzqGkP_oqDdJAQVt0djjIxGYuhE0zFDJV4
|
||||
# - POSTGREST_URL=http://supabase-rest:3000
|
||||
# - PGRST_JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
# - DATABASE_URL=postgres://supabase_storage_admin:${SERVICE_PASSWORD_POSTGRES}@${POSTGRES_HOSTNAME:-supabase-db}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-postgres}
|
||||
# - FILE_SIZE_LIMIT=52428800
|
||||
# - STORAGE_BACKEND=s3
|
||||
# - STORAGE_S3_BUCKET=stub
|
||||
# - STORAGE_S3_ENDPOINT=http://supabase-minio:9000
|
||||
# - STORAGE_S3_PROTOCOL=http
|
||||
# - STORAGE_S3_REGION=stub
|
||||
# - STORAGE_S3_FORCE_PATH_STYLE=true
|
||||
# - AWS_ACCESS_KEY_ID=${SERVICE_USER_MINIO}
|
||||
# - AWS_SECRET_ACCESS_KEY=${SERVICE_PASSWORD_MINIO}
|
||||
# - AWS_DEFAULT_REGION=stub
|
||||
# - FILE_STORAGE_BACKEND_PATH=/var/lib/storage
|
||||
# - TENANT_ID=stub
|
||||
# # TODO: https://github.com/supabase/storage-api/issues/55
|
||||
# - REGION=stub
|
||||
# - ENABLE_IMAGE_TRANSFORMATION=true
|
||||
# - IMGPROXY_URL=http://imgproxy:8080
|
||||
- ANON_KEY=${SERVICE_SUPABASEANON_KEY}
|
||||
- SERVICE_KEY=${SERVICE_SUPABASESERVICE_KEY}
|
||||
- POSTGREST_URL=http://supabase-rest:3000
|
||||
- PGRST_JWT_SECRET=${SERVICE_PASSWORD_JWT}
|
||||
volumes:
|
||||
- ./volumes/storage:/var/lib/storage
|
||||
imgproxy:
|
||||
image: darthsim/imgproxy:v3.8.0
|
||||
image: darthsim/imgproxy:v3.30.1
|
||||
healthcheck:
|
||||
test: ["CMD", "imgproxy", "health"]
|
||||
timeout: 5s
|
||||
interval: 5s
|
||||
retries: 3
|
||||
environment:
|
||||
- IMGPROXY_BIND=:8080
|
||||
- IMGPROXY_LOCAL_FILESYSTEM_ROOT=/
|
||||
- IMGPROXY_USE_ETAG=true
|
||||
- IMGPROXY_ENABLE_WEBP_DETECTION=${IMGPROXY_ENABLE_WEBP_DETECTION:-true}
|
||||
- IMGPROXY_MAX_SRC_RESOLUTION=16.8
|
||||
volumes:
|
||||
- ./volumes/storage:/var/lib/storage
|
||||
|
||||
supabase-meta:
|
||||
image: supabase/postgres-meta:v0.89.3
|
||||
image: supabase/postgres-meta:v0.95.2
|
||||
depends_on:
|
||||
supabase-db:
|
||||
# Disable this if you are using an external Postgres database
|
||||
|
|
@ -1221,9 +1318,10 @@ services:
|
|||
- PG_META_DB_NAME=${POSTGRES_DB:-postgres}
|
||||
- PG_META_DB_USER=supabase_admin
|
||||
- PG_META_DB_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
|
||||
- CRYPTO_KEY=${SERVICE_PASSWORD_PGMETACRYPTO}
|
||||
|
||||
supabase-edge-functions:
|
||||
image: supabase/edge-runtime:v1.67.4
|
||||
image: supabase/edge-runtime:v1.70.3
|
||||
depends_on:
|
||||
supabase-analytics:
|
||||
condition: service_healthy
|
||||
|
|
@ -1246,7 +1344,6 @@ services:
|
|||
source: ./volumes/functions/main/index.ts
|
||||
target: /home/deno/functions/main/index.ts
|
||||
content: |
|
||||
import { serve } from 'https://deno.land/std@0.131.0/http/server.ts'
|
||||
import * as jose from 'https://deno.land/x/jose@v4.14.4/index.ts'
|
||||
|
||||
console.log('main function started')
|
||||
|
|
@ -1278,7 +1375,7 @@ services:
|
|||
return true
|
||||
}
|
||||
|
||||
serve(async (req: Request) => {
|
||||
Deno.serve(async (req: Request) => {
|
||||
if (req.method !== 'OPTIONS' && VERIFY_JWT) {
|
||||
try {
|
||||
const token = getAuthToken(req)
|
||||
|
|
@ -1348,9 +1445,7 @@ services:
|
|||
// https://deno.land/manual/getting_started/setup_your_environment
|
||||
// This enables autocomplete, go to definition, etc.
|
||||
|
||||
import { serve } from "https://deno.land/std@0.177.1/http/server.ts"
|
||||
|
||||
serve(async () => {
|
||||
Deno.serve(async () => {
|
||||
return new Response(
|
||||
`"Hello from Edge Functions!"`,
|
||||
{ headers: { "Content-Type": "application/json" } },
|
||||
|
|
@ -1367,7 +1462,7 @@ services:
|
|||
- /home/deno/functions/main
|
||||
|
||||
supabase-supavisor:
|
||||
image: 'supabase/supavisor:2.5.1'
|
||||
image: 'supabase/supavisor:2.7.4'
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
|
|
|
|||
Loading…
Reference in a new issue