Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update location of the .env files #303

Merged
merged 2 commits into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ yarn-error.log
*.lcov

# Environment variables
.env.override
.env.*.override
*.override.env

# Visual Studio Code
# https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"jest.jestCommandLine": "yarn jest",
"files.associations": {
".env.**": "dotenv"
},
"files.exclude": {
"**/.cache": true,
"**/.DS_Store": true,
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packageExtensions:
"@babel/runtime": ^7.15.4
relay-compiler@*:
dependencies:
relay-compiler-language-typescript: ^14.1.2
relay-compiler-language-typescript: ^14.1.3
relay-config: ^12.0.0

plugins:
Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@types/supertest": "^2.0.11",
"@types/validator": "^13.6.3",
"cross-spawn": "^7.0.3",
"envars": "^0.1.1",
"envars": "^0.2.0",
"fs-extra": "^10.0.0",
"knex-types": "^0.3.1",
"prettier": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"api": "workspace:*",
"chalk": "^4.1.2",
"cross-spawn": "^7.0.3",
"envars": "^0.1.1",
"envars": "^0.2.0",
"faker": "^5.5.3",
"knex": "^0.95.11",
"knex-types": "^0.3.1",
Expand Down
31 changes: 0 additions & 31 deletions env/.env

This file was deleted.

17 changes: 15 additions & 2 deletions env/.env.local → env/.local.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@
# $ yarn envars get <name> --env=local
#
# NOTE: You can override any of these settings by placing them
# into ".env.local.override" file (excluded from the repo).
# into ".local.override.env" file (excluded from the repo).

APP_NAME=example
APP_ORIGIN=http://localhost:3000
VERSION=latest

# Google Cloud
# https://console.cloud.google.com/
GOOGLE_CLOUD_PROJECT=example-dev
GOOGLE_CLOUD_REGION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=

# Cloudflare
# https://dash.cloudflare.com/
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_ZONE_ID=
CLOUDFLARE_API_TOKEN=

# PostgreSQL
# https://www.postgresql.org/docs/current/static/libpq-envars.html
Expand All @@ -23,9 +34,11 @@ PGSSLMODE=disable
# PGDEBUG=true

# Cloud storage bucket for user uploaded content and static assets
# https://console.cloud.google.com/storage/browser
UPLOAD_BUCKET=test-upload.example.com
STORAGE_BUCKET=test-s.example.com
CACHE_BUCKET=test-c.example.com
PKG_BUCKET=pkg.example.com

# JWT-based sessions
# https://github.com/auth0/node-jsonwebtoken
Expand All @@ -40,6 +53,7 @@ GOOGLE_CLIENT_SECRET=xxxxx
# https://developers.facebook.com/apps/
FACEBOOK_APP_ID=xxxxx
FACEBOOK_APP_SECRET=xxxxx
FACEBOOK_PAGE_ID=

# Email Settings
# https://nodemailer.com/
Expand All @@ -49,4 +63,3 @@ EMAIL_REPLY_TO=Example <hello@example.com>
# SendGrid Mail
# https://app.sendgrid.com/settings/api_keys
SENDGRID_API_KEY=SG.xxxxx

18 changes: 16 additions & 2 deletions env/.env.prod → env/.prod.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@
# $ yarn envars get <name> --env=prod
#
# NOTE: You can override any of these settings by placing them
# into ".env.prod.override" file (excluded from the repo).
# into ".prod.override.env" file (excluded from the repo).

APP_NAME=example
APP_ORIGIN=https://example.com
VERSION=latest

# Google Cloud
# https://console.cloud.google.com/
GOOGLE_CLOUD_PROJECT=example-prod
GOOGLE_CLOUD_REGION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=

# Cloudflare
# https://dash.cloudflare.com/
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_ZONE_ID=
CLOUDFLARE_API_TOKEN=

# PostgreSQL
# https://www.postgresql.org/docs/current/static/libpq-envars.html
Expand All @@ -23,12 +34,14 @@ PGDATABASE=app_prod
# PGSSLCERT=../db/ssl/client-cert.prod.pem
# PGSSLKEY=../db/ssl/client-key.prod.pem
# PGSSLROOTCERT=../db/ssl/server-ca.prod.pem
# PGSERVERNAME=example-prod:pg12
# PGSERVERNAME=example-prod:pg13

# Cloud storage bucket for user uploaded content and static assets
# https://console.cloud.google.com/storage/browser
UPLOAD_BUCKET=upload.example.com
STORAGE_BUCKET=s.example.com
CACHE_BUCKET=c.example.com
PKG_BUCKET=pkg.example.com

# JWT-based sessions
# https://github.com/auth0/node-jsonwebtoken
Expand All @@ -43,6 +56,7 @@ GOOGLE_CLIENT_SECRET=xxxxx
# https://developers.facebook.com/apps/
FACEBOOK_APP_ID=xxxxx
FACEBOOK_APP_SECRET=xxxxx
FACEBOOK_PAGE_ID=

# Email Settings
# https://nodemailer.com/
Expand Down
18 changes: 16 additions & 2 deletions env/.env.test → env/.test.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@
# $ yarn envars get <name> --env=test
#
# NOTE: You can override any of these settings by placing them
# into ".env.test.override" file (excluded from the repo).
# into ".test.override.env" file (excluded from the repo).

APP_NAME=example
APP_ORIGIN=https://test.example.com
VERSION=latest

# Google Cloud
# https://console.cloud.google.com/
GOOGLE_CLOUD_PROJECT=example-test
GOOGLE_CLOUD_REGION=us-central1
GOOGLE_APPLICATION_CREDENTIALS=

# Cloudflare
# https://dash.cloudflare.com/
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_ZONE_ID=
CLOUDFLARE_API_TOKEN=

# PostgreSQL
# https://www.postgresql.org/docs/current/static/libpq-envars.html
Expand All @@ -23,12 +34,14 @@ PGDATABASE=app_test
# PGSSLCERT=../db/ssl/client-cert.test.pem
# PGSSLKEY=../db/ssl/client-key.test.pem
# PGSSLROOTCERT=../db/ssl/server-ca.test.pem
# PGSERVERNAME=example-test:pg12
# PGSERVERNAME=example-test:pg13

# Cloud storage bucket for user uploaded content and static assets
# https://console.cloud.google.com/storage/browser
UPLOAD_BUCKET=upload.example.com
STORAGE_BUCKET=test-s.example.com
CACHE_BUCKET=test-c.example.com
PKG_BUCKET=pkg.example.com

# JWT-based sessions
# https://github.com/auth0/node-jsonwebtoken
Expand All @@ -43,6 +56,7 @@ GOOGLE_CLIENT_SECRET=xxxxx
# https://developers.facebook.com/apps/
FACEBOOK_APP_ID=xxxxx
FACEBOOK_APP_SECRET=xxxxx
FACEBOOK_PAGE_ID=

# Email Settings
# https://nodemailer.com/
Expand Down
4 changes: 2 additions & 2 deletions env/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Environment Variables

This folder contains environment variables and keys that can be shared across multiple
projects within the monorepo (`api`, `web`, etc.).
This folder contains environment variables and keys that can be shared across
multiple projects within the monorepo (`api`, `web`, etc.).

**IMPORTANT**: Database passwords, API keys etc. need to be stored encrypted.

Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@octokit/rest": "^18.11.4",
"api": "workspace:*",
"cross-spawn": "^7.0.3",
"envars": "^0.1.1",
"envars": "^0.2.0",
"file-type": "^16.5.3",
"form-data": "^4.0.0",
"globby": "^11.0.4",
Expand Down
Loading