feat(env): add example environment files for database and authentication configuration

This commit is contained in:
ngc2207 2024-12-29 16:37:06 +08:00
parent bb4fb0639b
commit 3a45ac9044
3 changed files with 24 additions and 0 deletions

2
.env.example Normal file
View File

@ -0,0 +1,2 @@
# Prisma database connection URL
DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<database>?schema=<schema>

20
.env.local.example Normal file
View File

@ -0,0 +1,20 @@
# Auth.js secret key (generate with `npx auth secret`)
AUTH_SECRET=""
# GitHub OAuth credentials (from GitHub Developer Settings)
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
# Gitea OAuth credentials (choose either official Gitea or self-hosted Gitea, not both)
# Official Gitea credentials
# AUTH_GITEA_ID=""
# AUTH_GITEA_SECRET=""
# Self-hosted Gitea credentials
GITEA_BASE_URL="http://localhost:3000"
AUTH_GITEA_ID=""
AUTH_GITEA_SECRET=""
# Next.js application URL (trusted host for Auth.js)
AUTH_TRUST_HOST="http://localhost:4000"

2
.gitignore vendored
View File

@ -31,6 +31,8 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
!.env.example
!.env.local.example
# vercel
.vercel