From 3a45ac90446d33a126a61352dd860e6613d841a3 Mon Sep 17 00:00:00 2001 From: ngc2207 Date: Sun, 29 Dec 2024 16:37:06 +0800 Subject: [PATCH] feat(env): add example environment files for database and authentication configuration --- .env.example | 2 ++ .env.local.example | 20 ++++++++++++++++++++ .gitignore | 2 ++ 3 files changed, 24 insertions(+) create mode 100644 .env.example create mode 100644 .env.local.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..0157a46 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +# Prisma database connection URL +DATABASE_URL=postgresql://:@:/?schema= diff --git a/.env.local.example b/.env.local.example new file mode 100644 index 0000000..d0489ba --- /dev/null +++ b/.env.local.example @@ -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" diff --git a/.gitignore b/.gitignore index ecd0089..c375151 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,8 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env* +!.env.example +!.env.local.example # vercel .vercel