diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-03-04 16:49:41 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-03-04 16:49:41 +0100 |
| commit | 4ed70beabc73dd9aa1d2e06ab5902ded0801c404 (patch) | |
| tree | 05fb731e5c937be885c6d03f31f40f1f9fd2cf8c /.env.example | |
| parent | 4378c4553b17d5435b08387d80377bce666dc838 (diff) | |
chore: use a different configuration depending on app env
It will be useful with Docker. Instead of cloning the project with a
different configuration, I can manage two different configuration
thanks to dotenv and some checking inside the app.
Diffstat (limited to '.env.example')
| -rw-r--r-- | .env.example | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/.env.example b/.env.example index 479f9b1..4d98551 100644 --- a/.env.example +++ b/.env.example @@ -1,27 +1,39 @@ +# Without Docker: manually set app_env (staging, production) +#APP_ENV="production" + +NEXT_PUBLIC_APP_ENV="$APP_ENV" + +# Production +APP_PROTOCOL="https" APP_FRONTEND_DOMAIN="www.frontend.com" APP_BACKEND_DOMAIN="www.backend.com" -APP_PROTOCOL="https" APP_GRAPHQL_ENDPOINT="/graphql" +APP_DOCKER_PORT=3000 + +NEXT_PUBLIC_APP_URL="$APP_PROTOCOL://$APP_FRONTEND_DOMAIN" +NEXT_PUBLIC_GRAPHQL_API="https://$APP_BACKEND_DOMAIN$APP_GRAPHQL_ENDPOINT" + +# Staging - If running multiple instances (Docker) +#APP_STAGING_PROTOCOL="https" +#APP_STAGING_FRONTEND_DOMAIN="www.frontend.com" +#APP_STAGING_BACKEND_DOMAIN="www.backend.com" +#APP_STAGING_GRAPHQL_ENDPOINT="/graphql" +#APP_STAGING_DOCKER_PORT=3200 + +#NEXT_PUBLIC_STAGING_APP_URL="$APP_STAGING_PROTOCOL://$APP_STAGING_FRONTEND_DOMAIN" +#NEXT_PUBLIC_STAGING_GRAPHQL_API="https://$APP_STAGING_BACKEND_DOMAIN$APP_STAGING_GRAPHQL_ENDPOINT" + +# Common APP_AUTHOR_NAME="Your Name" APP_AUTHOR_EMAIL="your@email.com" APP_AUTHOR_URL="https://www.yourWebsite.com/" APP_FEED_DESCRIPTION="What you want..." -NEXT_PUBLIC_APP_DOMAIN="$APP_FRONTEND_DOMAIN" -NEXT_PUBLIC_APP_PROTOCOL="$APP_PROTOCOL" -NEXT_PUBLIC_GRAPHQL_API="https://$APP_BACKEND_DOMAIN$APP_GRAPHQL_ENDPOINT" NEXT_PUBLIC_ACKEE_DOMAIN="www.ackeeDomain.com" NEXT_PUBLIC_ACKEE_FILENAME="tracker.js" NEXT_PUBLIC_ACKEE_SITE_ID="your-id-string" -# Docker configuration -APP_DOCKER_PORT_PROD=3000 -APP_DOCKER_PORT_DEV=3200 - # Use this only in development mode. It prevents "unable to verify the first # certificate" error when using a local domain with mkcert certificate for # backend. #NODE_TLS_REJECT_UNAUTHORIZED=0 - -# Set node environment to not install dev dependencies. -#NODE_ENV=production |
