mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
updated env for development and so auto setup builds
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
+36
-33
@@ -1,10 +1,13 @@
|
|||||||
# ═══════════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
# $APP_NAME — Environment Variables Template (LOCAL DEVELOPMENT)
|
# $APP_NAME — Environment Variables Template (LOCAL DEVELOPMENT)
|
||||||
# Copy to .env and fill in the CHANGE_ME values before running `npm run dev`.
|
# Points at the team's shared dev infra (CockroachDB Cloud, Garage, Google
|
||||||
|
# OAuth, PayPal Sandbox, Gmail) — nothing to stand up locally. The only
|
||||||
|
# CHANGE_ME values left are the 4 per-machine secrets (JWT*/SESSION_SECRET,
|
||||||
|
# auto-generated by new_starr_setup's wizard) and the optional Chibisafe block.
|
||||||
#
|
#
|
||||||
# Local development setup:
|
# Local development setup:
|
||||||
# 1. cp .env-development .env
|
# 1. cp .env-development .env
|
||||||
# 2. Fill in every CHANGE_ME value below
|
# 2. Fill in the remaining CHANGE_ME values below (or let the setup wizard do it)
|
||||||
# 3. npm install
|
# 3. npm install
|
||||||
# 4. npm run dev (nodemon, auto-restarts on file change)
|
# 4. npm run dev (nodemon, auto-restarts on file change)
|
||||||
#
|
#
|
||||||
@@ -21,17 +24,17 @@ NODE_ENV=development
|
|||||||
ORIGIN_GUARD_DISABLED=true # allows Postman/curl in dev; hard-locked false when NODE_ENV=production
|
ORIGIN_GUARD_DISABLED=true # allows Postman/curl in dev; hard-locked false when NODE_ENV=production
|
||||||
PORT=3024
|
PORT=3024
|
||||||
APP_URL=http://localhost:3024
|
APP_URL=http://localhost:3024
|
||||||
APP_LOGO_URL=https://your-cdn.com/logo.png
|
APP_LOGO_URL=https://cq5as7pc73.ufs.sh/f/pHNnzIw3VjcgjEJ1kFubDgYdvnt1cCAMyRjfOIGiUXPmZF3W
|
||||||
FRONTEND_URL=http://localhost:5173
|
FRONTEND_URL=http://localhost:5173
|
||||||
|
|
||||||
# ── Database (PostgreSQL) ─────────────────────────────────────────────────────
|
# ── Database (PostgreSQL) ─────────────────────────────────────────────────────
|
||||||
# Local Postgres install — no SSL needed.
|
# Shared team CockroachDB Cloud cluster — SSL is on by default (see
|
||||||
DB_HOST=127.0.0.1
|
# config/db.config.js: useSSL is true unless DB_SSL=false is set explicitly).
|
||||||
DB_PORT=5432
|
DB_HOST=philproperties-16426.j77.aws-ap-southeast-1.cockroachlabs.cloud
|
||||||
DB_NAME=CHANGE_ME
|
DB_PORT=26257
|
||||||
DB_USER=CHANGE_ME
|
DB_NAME=star-philpro
|
||||||
DB_PASSWORD=CHANGE_ME
|
DB_USER=lash
|
||||||
DB_SSL=false
|
DB_PASSWORD=K5mXTLyL_FrVGOHLHpzU4g
|
||||||
DB_FORCE_SYNC=false # never drop tables — even in dev, unless you mean it
|
DB_FORCE_SYNC=false # never drop tables — even in dev, unless you mean it
|
||||||
|
|
||||||
# ── Cache driver ──────────────────────────────────────────────────────────────
|
# ── Cache driver ──────────────────────────────────────────────────────────────
|
||||||
@@ -40,7 +43,10 @@ DB_FORCE_SYNC=false # never drop tables — even in dev, unless you mean it
|
|||||||
CACHE_DRIVER=memory
|
CACHE_DRIVER=memory
|
||||||
|
|
||||||
# ── JWT ───────────────────────────────────────────────────────────────────────
|
# ── JWT ───────────────────────────────────────────────────────────────────────
|
||||||
# Generate each secret independently — never reuse across fields.
|
# Per-machine secrets — never reuse across fields or share between devs.
|
||||||
|
# new_starr_setup's wizard auto-generates fresh values for these on first run;
|
||||||
|
# if filling this in by hand instead, generate each independently:
|
||||||
|
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
|
||||||
JWT_SECRET=CHANGE_ME_32_BYTE_HEX
|
JWT_SECRET=CHANGE_ME_32_BYTE_HEX
|
||||||
MEDIA_JWT_SECRET=CHANGE_ME_32_BYTE_HEX
|
MEDIA_JWT_SECRET=CHANGE_ME_32_BYTE_HEX
|
||||||
JWT_EXPIRES_IN=15m
|
JWT_EXPIRES_IN=15m
|
||||||
@@ -48,41 +54,38 @@ JWT_REFRESH_SECRET=CHANGE_ME_32_BYTE_HEX
|
|||||||
JWT_REFRESH_EXPIRES_IN=7d
|
JWT_REFRESH_EXPIRES_IN=7d
|
||||||
|
|
||||||
# ── CSRF & Cookies ────────────────────────────────────────────────────────────
|
# ── CSRF & Cookies ────────────────────────────────────────────────────────────
|
||||||
|
# Also per-machine — auto-generated by the setup wizard, see note above.
|
||||||
SESSION_SECRET=CHANGE_ME_32_BYTE_HEX
|
SESSION_SECRET=CHANGE_ME_32_BYTE_HEX
|
||||||
|
|
||||||
# ── Google OAuth ──────────────────────────────────────────────────────────────
|
# ── Google OAuth ──────────────────────────────────────────────────────────────
|
||||||
# console.cloud.google.com → Credentials → OAuth 2.0 Client ID
|
# Shared team OAuth client (console.cloud.google.com → Credentials).
|
||||||
# Add http://localhost:3024/api/auth/google/callback to Authorized redirect URIs
|
GOOGLE_CLIENT_ID=379154949440-atchm4lurp9c1k23vbsjvgnqod2o9s5c.apps.googleusercontent.com
|
||||||
GOOGLE_CLIENT_ID=CHANGE_ME
|
GOOGLE_CLIENT_SECRET=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
|
||||||
GOOGLE_CLIENT_SECRET=CHANGE_ME
|
|
||||||
GOOGLE_CALLBACK_URL=http://localhost:3024/api/auth/google/callback
|
GOOGLE_CALLBACK_URL=http://localhost:3024/api/auth/google/callback
|
||||||
|
|
||||||
# ── PayPal ────────────────────────────────────────────────────────────────────
|
# ── PayPal ────────────────────────────────────────────────────────────────────
|
||||||
# Use Sandbox credentials for local testing: developer.paypal.com → Sandbox tab.
|
# Shared team Sandbox app: developer.paypal.com → Sandbox tab.
|
||||||
PAYPAL_CLIENT_ID=CHANGE_ME
|
PAYPAL_CLIENT_ID=AYjb-DmhvvCagQM0SZxw-sfz30Qb8D-dBPr-wmvq80zOKmfxUrKykv-h85Kzp_Z5YmCX4T06DlaH2-zK
|
||||||
PAYPAL_CLIENT_SECRET=CHANGE_ME
|
PAYPAL_CLIENT_SECRET=EDkmLa47T0H5QtKdO8VfKdEDh--tuzP0Q2c_RFKASvdIJvs2j051v7j2hW0f8JxNDpjW8XyixE4JCxV4
|
||||||
PAYPAL_ENV=sandbox
|
PAYPAL_ENV=sandbox
|
||||||
|
|
||||||
# ── Email (Gmail API — OAuth2, over HTTPS) ────────────────────────────────────
|
# ── Email (Gmail API — OAuth2, over HTTPS) ────────────────────────────────────
|
||||||
# Reuses the same OAuth client as GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET above —
|
# Reuses the same OAuth client as GOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET above.
|
||||||
# enable the Gmail API on that project, then run:
|
# Shared team refresh token — same value the deployed app uses.
|
||||||
# node scripts/get_gmail_refresh_token.js
|
GMAIL_REFRESH_TOKEN=1//0ebfPPkFoe9piCgYIARAAGA4SNwF-L9IrsTIWK1dWFRa2dmc33jd94_u5IA-LpTKQweSi3NODT78UhX91OH25ewE_riCT-DjaQg8
|
||||||
# and paste the printed value below.
|
EMAIL_FROM=services.philpro@gmail.com
|
||||||
GMAIL_REFRESH_TOKEN=CHANGE_ME
|
|
||||||
EMAIL_FROM=CHANGE_ME@gmail.com
|
|
||||||
|
|
||||||
OTP_EXPIRY_MINUTES=10
|
OTP_EXPIRY_MINUTES=10
|
||||||
|
|
||||||
# ── S3-compatible Storage (Garage, run locally — bare-metal) ─────────────────
|
# ── S3-compatible Storage (Garage) ────────────────────────────────────────────
|
||||||
# Run Garage directly on your machine (the docker-compose.yml Garage service
|
# Shared team Garage instance. Uses the public HTTPS endpoint here (not a
|
||||||
# is set up for the production stack). See:
|
# loopback/WireGuard address) so it works on a fresh machine with no tunnel.
|
||||||
# https://garagehq.deuxfleurs.fr/documentation/quick-start/
|
S3_ENDPOINT=https://media.star-philpro-media.space
|
||||||
S3_ENDPOINT=http://127.0.0.1:3900
|
|
||||||
S3_REGION=garage
|
S3_REGION=garage
|
||||||
S3_ACCESS_KEY=CHANGE_ME
|
S3_ACCESS_KEY=GK1c811a656fafd5ae444eea7b747c4869
|
||||||
S3_SECRET_KEY=CHANGE_ME
|
S3_SECRET_KEY=76001b32d753375bd1fc22c9389b590021143b6fbe9d1688d8ed4dba5f004965
|
||||||
S3_BUCKET=CHANGE_ME
|
S3_BUCKET=philproperties
|
||||||
S3_PUBLIC_URL=http://127.0.0.1:3900
|
S3_PUBLIC_URL=https://media.star-philpro-media.space
|
||||||
|
|
||||||
# ── Chibisafe (optional — used alongside S3 for some asset types) ────────────
|
# ── Chibisafe (optional — used alongside S3 for some asset types) ────────────
|
||||||
CHIBISAFE_BASE_URL=CHANGE_ME
|
CHIBISAFE_BASE_URL=CHANGE_ME
|
||||||
|
|||||||
Reference in New Issue
Block a user