caterium-app/ops/supabase-selfhosted/volumes/api/kong.yml
pavlov346346 88b7f55db4 Ops: add self-hosted Supabase stack for Timeweb Cloud migration
Full production-ready docker-compose stack (db, kong, auth, rest,
realtime, storage, imgproxy, meta, functions, studio) targeting
api.caterium.ru, plus bootstrap script for a fresh Cloud Server,
Caddy reverse-proxy config (HTTPS, WebSocket, upload limits), and
dump/restore/verify/storage-sync scripts for moving off the managed
Supabase project (cksuehzcimitsxmeloes). Does not touch public/ or
any live runtime behavior — frontend cutover is documented separately
in frontend-cutover.md and only applied after Etap 8 verification.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 16:20:45 +03:00

113 lines
2.6 KiB
YAML

_format_version: "2.1"
_transform: true
consumers:
- username: anon
keyauth_credentials:
- key: ${SUPABASE_ANON_KEY}
- username: service_role
keyauth_credentials:
- key: ${SUPABASE_SERVICE_ROLE_KEY}
acls:
- consumer: anon
group: anon
- consumer: service_role
group: admin
services:
- name: auth-v1
url: http://auth:9999/
routes:
- name: auth-v1-all
strip_path: true
paths:
- /auth/v1/
plugins:
- name: cors
config:
origins:
- https://app.caterium.ru
methods: [GET, POST, PUT, PATCH, DELETE, OPTIONS]
headers: [Authorization, apikey, Content-Type, X-Client-Info]
credentials: true
- name: rest-v1
url: http://rest:3000/
routes:
- name: rest-v1-all
strip_path: true
paths:
- /rest/v1/
plugins:
- name: cors
config:
origins:
- https://app.caterium.ru
methods: [GET, POST, PUT, PATCH, DELETE, OPTIONS]
headers: [Authorization, apikey, Content-Type, X-Client-Info, Prefer, Range]
credentials: true
- name: realtime-v1
url: http://realtime:4000/socket/
routes:
- name: realtime-v1-all
strip_path: true
paths:
- /realtime/v1/
plugins:
- name: cors
config:
origins:
- https://app.caterium.ru
methods: [GET, POST, OPTIONS]
headers: [Authorization, apikey, Content-Type, X-Client-Info]
credentials: true
- name: storage-v1
url: http://storage:5000/
routes:
- name: storage-v1-all
strip_path: true
paths:
- /storage/v1/
plugins:
- name: cors
config:
origins:
- https://app.caterium.ru
methods: [GET, POST, PUT, PATCH, DELETE, OPTIONS]
headers: [Authorization, apikey, Content-Type, X-Client-Info, x-upsert]
credentials: true
- name: functions-v1
url: http://functions:9000/
routes:
- name: functions-v1-all
strip_path: true
paths:
- /functions/v1/
plugins:
- name: cors
config:
origins:
- https://app.caterium.ru
methods: [GET, POST, OPTIONS]
headers: [Authorization, apikey, Content-Type, X-Client-Info]
credentials: true
- name: meta-v1
url: http://meta:8080/
routes:
- name: meta-v1-all
strip_path: true
paths:
- /pg/
plugins:
- name: key-auth
config:
key_names: [apikey]
- name: acl
config:
allow: [admin]