refactor: Simplify Supabase and Teable blueprint JWT and port configurations

This commit is contained in:
Mauricio Siu
2025-03-09 22:00:36 -06:00
parent b32f752439
commit 09e6fd6aa3
2 changed files with 6 additions and 4 deletions

View File

@@ -4,6 +4,8 @@ variables:
jwt_secret: ${base64:32}
dashboard_password: ${password:32}
logflare_api_key: ${password:32}
anon_key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogImFub24iLAogICJpc3MiOiAic3VwYWJhc2UiLAogICJpYXQiOiAxNzQxNTAwMDAwLAogICJleHAiOiAxODk5MjY2NDAwCn0.muKe0Nrvkf5bMyLoFqAuFypRu3jHAcTYU08SYKrgRQo
service_role_key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogInNlcnZpY2Vfcm9sZSIsCiAgImlzcyI6ICJzdXBhYmFzZSIsCiAgImlhdCI6IDE3NDE1MDAwMDAsCiAgImV4cCI6IDE4OTkyNjY0MDAKfQ.1KoSiJVueKJNkF59uc84BLqk7h8VdAoVp6Gozqr_vGc
config:
domains:
@@ -15,8 +17,8 @@ config:
SUPABASE_HOST: ${main_domain}
POSTGRES_PASSWORD: ${postgres_password}
JWT_SECRET: ${jwt_secret}
ANON_KEY: ${generateJWT({ role: "anon", iss: "supabase", iat: Math.floor(Date.now() / 1000), exp: Math.floor(Date.now() / 1000) + 100 * 365 * 24 * 60 * 60 }, jwt_secret)}
SERVICE_ROLE_KEY: ${generateJWT({ role: "service_role", iss: "supabase", iat: Math.floor(Date.now() / 1000), exp: Math.floor(Date.now() / 1000) + 100 * 365 * 24 * 60 * 60 }, jwt_secret)}
ANON_KEY: ${anon_key}
SERVICE_ROLE_KEY: ${service_role_key}
DASHBOARD_USERNAME: "supabase"
DASHBOARD_PASSWORD: ${dashboard_password}
POSTGRES_HOSTNAME: "db"

View File

@@ -1,7 +1,7 @@
variables:
main_domain: ${randomDomain}
db_password: ${password}
public_db_port: ${Math.round(Math.random() * (65534 - 32769) + 32769)}
public_db_port: ${randomPort}
config:
domains:
@@ -22,7 +22,7 @@ config:
# App
PUBLIC_ORIGIN: https://${main_domain}
PRISMA_DATABASE_URL: postgresql://teable:${db_password}@teable-db:5432/teable
PUBLIC_DATABASE_PROXY: ${main_domain}:${public_db_port}
PUBLIC_DATABASE_PROXY: ${TEABLE_HOST}:${TEABLE_DB_PORT}
# Need to support sending emails to enable the following configurations
# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.
#BACKEND_MAIL_HOST: "smtp.teable.io"