chore: move env examples to env-example/ and unify CDN env source
- Reorganize env example files into a dedicated env-example/ directory for clarity - Update .gitignore to ignore env files (with examples now in env-example/) - Unify CDN credentials (CF_ZONE_ID / CF_API_TOKEN) to be sourced from .env.local in both test and production deploys - Update git_hooks/post-receive to copy production env example from new location - Update deploy scripts (pre_release_web.sh, release_web.sh) to copy the appropriate env example into .env.local before building - Update _deploy_lib.sh purge_cdn_cache to source from .env.local instead of .env
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# 当前环境: development
|
||||
NEXT_PUBLIC_APP_ENV=development
|
||||
|
||||
# 后端 API 基础 URL(开发环境)
|
||||
NEXT_PUBLIC_API_BASE_URL=http://172.16.48.49:3002
|
||||
|
||||
# WebSocket URL(开发环境,可选)
|
||||
NEXT_PUBLIC_WS_BASE_URL=ws://172.16.48.49:3002
|
||||
|
||||
# API 超时时间(毫秒)
|
||||
NEXT_PUBLIC_API_CONNECT_TIMEOUT=30000
|
||||
NEXT_PUBLIC_API_RECEIVE_TIMEOUT=60000
|
||||
NEXT_PUBLIC_API_SEND_TIMEOUT=30000
|
||||
|
||||
# next-auth v4(Auth.js)
|
||||
AUTH_SECRET=+0ttNDq3+OCNTrdcokOR4GZo761PiVJIGZOqUsnFOIg=
|
||||
|
||||
# 第三方 OAuth
|
||||
AUTH_GOOGLE_ID=351948560061-isubggf6eahfii9n0stpf2qu3haralro.apps.googleusercontent.com
|
||||
AUTH_GOOGLE_SECRET=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
|
||||
AUTH_FACEBOOK_ID=26934819589512827
|
||||
AUTH_FACEBOOK_SECRET=004b1a9384b3433e153992e5edcef4ad
|
||||
|
||||
# Cloudflare CDN(test / production 部署后刷缓存用)
|
||||
CF_ZONE_ID=b1b6bfb7795667609c8e7f418af0156b
|
||||
CF_API_TOKEN=cfut_xyHb70XCw0j8f5Wz5fg5PemUQ2ZHnSpWvmrBvVeK94d3b00f
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
NEXT_PUBLIC_APP_ENV=test
|
||||
NEXT_PUBLIC_API_BASE_URL=https://api.cozsweet.com
|
||||
NEXT_PUBLIC_WS_BASE_URL=wss://api.cozsweet.com
|
||||
NEXT_PUBLIC_API_CONNECT_TIMEOUT=30000
|
||||
NEXT_PUBLIC_API_RECEIVE_TIMEOUT=60000
|
||||
NEXT_PUBLIC_API_SEND_TIMEOUT=30000
|
||||
|
||||
# next-auth v4(Auth.js)
|
||||
AUTH_SECRET=+0ttNDq3+OCNTrdcokOR4GZo761PiVJIGZOqUsnFOIg=
|
||||
|
||||
# 第三方 OAuth
|
||||
AUTH_GOOGLE_ID=351948560061-isubggf6eahfii9n0stpf2qu3haralro.apps.googleusercontent.com
|
||||
AUTH_GOOGLE_SECRET=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
|
||||
AUTH_FACEBOOK_ID=26934819589512827
|
||||
AUTH_FACEBOOK_SECRET=004b1a9384b3433e153992e5edcef4ad
|
||||
|
||||
# Cloudflare CDN(test / production 部署后刷缓存用)
|
||||
CF_ZONE_ID=b1b6bfb7795667609c8e7f418af0156b
|
||||
CF_API_TOKEN=cfut_xyHb70XCw0j8f5Wz5fg5PemUQ2ZHnSpWvmrBvVeK94d3b00f
|
||||
@@ -0,0 +1,26 @@
|
||||
# 当前环境: production
|
||||
NEXT_PUBLIC_APP_ENV=production
|
||||
|
||||
# 后端 API 基础 URL(生产环境)
|
||||
NEXT_PUBLIC_API_BASE_URL=https://api.cozsweet.com
|
||||
|
||||
# WebSocket URL(生产环境,可选)
|
||||
NEXT_PUBLIC_WS_BASE_URL=wss://api.cozsweet.com
|
||||
|
||||
# API 超时时间(毫秒)
|
||||
NEXT_PUBLIC_API_CONNECT_TIMEOUT=30000
|
||||
NEXT_PUBLIC_API_RECEIVE_TIMEOUT=60000
|
||||
NEXT_PUBLIC_API_SEND_TIMEOUT=30000
|
||||
|
||||
# next-auth v4(Auth.js)
|
||||
AUTH_SECRET=+0ttNDq3+OCNTrdcokOR4GZo761PiVJIGZOqUsnFOIg=
|
||||
|
||||
# 第三方 OAuth
|
||||
AUTH_GOOGLE_ID=351948560061-isubggf6eahfii9n0stpf2qu3haralro.apps.googleusercontent.com
|
||||
AUTH_GOOGLE_SECRET=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
|
||||
AUTH_FACEBOOK_ID=26934819589512827
|
||||
AUTH_FACEBOOK_SECRET=004b1a9384b3433e153992e5edcef4ad
|
||||
|
||||
# Cloudflare CDN(test / production 部署后刷缓存用)
|
||||
CF_ZONE_ID=b1b6bfb7795667609c8e7f418af0156b
|
||||
CF_API_TOKEN=cfut_xyHb70XCw0j8f5Wz5fg5PemUQ2ZHnSpWvmrBvVeK94d3b00f
|
||||
Reference in New Issue
Block a user