Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DB_CONNECTION_MODE=direct
DATABASE_URL=postgres://postgres:postgres@127.0.0.1:5432/postgres

# `openssl rand -hex 32`
Expand All @@ -9,3 +10,10 @@ NEXT_PUBLIC_NEXTAUTH_URL=https://localhost:3001
OAUTH_REDIRECT_URI=https://localhost:3001/callback
OAUTH_CLIENT_ID=local-client
OAUTH_CLIENT_SECRET=****

# Cloud SQL Auth Proxy (Cloud Connector) — these are relevant if DB_CONNECTION_MODE=connector
# CLOUD_SQL_CONNECTION_NAME=PROJECT:REGION:INSTANCE
# DB_USER=your_db_user
# DB_PASSWORD=****
# DB_NAME=your_db_name
# CLOUD_SQL_IP_TYPE=PRIVATE
29 changes: 29 additions & 0 deletions apphosting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,32 @@ env:
availability:
- BUILD
- RUNTIME

# Database connection mode: "connector" (Cloud SQL Connector) or "direct" (DATABASE_URL).
- variable: DB_CONNECTION_MODE
value: direct
availability:
- RUNTIME

# Cloud SQL Connector settings (only used when DB_CONNECTION_MODE=connector).
- variable: CLOUD_SQL_CONNECTION_NAME
value: f3data:us-central1:f3data
availability:
- RUNTIME
- variable: DB_USER
value: app_codex
availability:
- RUNTIME
- variable: DB_PASSWORD
secret: client-database-password
availability:
- RUNTIME
- variable: DB_NAME
value: f3_prod
availability:
- RUNTIME

- variable: CLOUD_SQL_IP_TYPE
value: PUBLIC
availability:
- RUNTIME
Loading
Loading