boxyhq / saas-starter-kit

🔥 Enterprise SaaS Starter Kit - Kickstart your enterprise app development with the Next.js SaaS boilerplate 🚀
https://boxyhq.com/blog/enterprise-ready-saas-starter-kit
Apache License 2.0
3.42k stars 786 forks source link

Documentation of DB Connection environment variable is inconsistent #678

Open ontoneio opened 1 year ago

ontoneio commented 1 year ago

In the /.env.example file there is a variable named DATABASE_URL that is also present in the following files in this boilerplate:

However in the documentation here: https://boxyhq.com/docs/jackson/deploy/env-variables#db_url

The environment variable is of a shortened case. I don't mind making a pull request with these changes, but I was wondering if the long form of the variable is more favorable than the short one? In which case the change should be to the documentation on the site.

Super cool project everyone! Thanks!

devkiran commented 1 year ago

@ontoneio SAML Jackson uses DB_URL as the environment variable name. The DATABASE_URL is used by the @prisma/client package. Both are different packages hence the different variable names. Updating DB_URL to DATABASE_URL will effectively break SAML Jackson.

deepakprabhakara commented 1 year ago

@devkiran DB_URL is not used by the embedded npm, we pass the URL to it.

deepakprabhakara commented 1 year ago

Aah I see the confusion now, @ontoneio we could also support DB_URL here but don't think it's necessary

ontoneio commented 1 year ago

@deepakprabhakara Ok this all makes sense when explained here, but maybe it's worth clarifying somewhere in the docs? Perhaps in an INFO box on the environment variables page? Or maybe clarifying with this repo's README specifically? Whatever the case It's unclear which to use, or if we have to redundantly set both in order to use the boilerplate.

deepakprabhakara commented 1 year ago

@ontoneio Agreed. We have to document all the env vars, README or a link in readme to another doc is a good place for that

KazeroG commented 8 months ago

After analyzing all the env vars, this is the list for the best production env :

I use Vercel to deploy !


APP_URL=""
AUTH_PROVIDERS=""
CONFIRM_EMAIL=""
DATABASE_URL="postgresql://postgres:pasword-Gf@hostname:56736/db"
DISABLE_NON_BUSINESS_EMAIL_SIGNUP=""
FEATURE_TEAM_API_KEY=""
FEATURE_TEAM_AUDIT_LOG=""
FEATURE_TEAM_DELETION=""
FEATURE_TEAM_DSYNC=""
FEATURE_TEAM_PAYMENTS=""
FEATURE_TEAM_SSO=""
FEATURE_TEAM_WEBHOOK=""
GROUP_PREFIX="boxyhq-"
HIDE_LANDING_PAGE=""
MAX_LOGIN_ATTEMPTS="5"
NEXTAUTH_SECRET=""
NEXTAUTH_SESSION_STRATEGY=""
NEXTAUTH_URL=""
NEXT_PUBLIC_DARK_MODE=""
NEXT_PUBLIC_MIXPANEL_TOKEN="6"
NEXT_PUBLIC_PRIVACY_URL="/privacy"
NEXT_PUBLIC_SUPPORT_URL="/"
NEXT_PUBLIC_TERMS_URL="/terms"
NX_DAEMON=""
SMTP_FROM=""
SMTP_HOST=""
SMTP_PASSWORD=""
SMTP_PORT="587"
SMTP_USER=""
STRIPE_SECRET_KEY=""
STRIPE_WEBHOOK_SECRET=""
SVIX_API_KEY=""
SVIX_URL="https://api.eu.svix.com"
TURBO_REMOTE_ONLY=""
TURBO_RUN_SUMMARY=""
VERCEL="1"
VERCEL_ENV="development"
VERCEL_GIT_COMMIT_AUTHOR_LOGIN=""
VERCEL_GIT_COMMIT_AUTHOR_NAME=""
VERCEL_GIT_COMMIT_MESSAGE=""
VERCEL_GIT_COMMIT_REF=""
VERCEL_GIT_COMMIT_SHA=""
VERCEL_GIT_PREVIOUS_SHA=""
VERCEL_GIT_PROVIDER=""
VERCEL_GIT_PULL_REQUEST_ID=""
VERCEL_GIT_REPO_ID=""
VERCEL_GIT_REPO_OWNER=""
VERCEL_GIT_REPO_SLUG=""
VERCEL_URL=""
SENTRY_IGNORE_API_RESOLUTION_ERROR=1