Skip to content

Commit ab348af

Browse files
committed
Prefix all environment variables with STACK_
1 parent 1746ca4 commit ab348af

File tree

19 files changed

+125
-129
lines changed

19 files changed

+125
-129
lines changed

.github/workflows/link-and-build.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
NEXT_PUBLIC_STACK_PROJECT_ID: internal
2020
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY: internal-project-publishable-client-key
2121
STACK_SECRET_SERVER_KEY: internal-project-secret-server-key
22-
SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
22+
STACK_SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
2323

24-
EMAIL_HOST: 0.0.0.0
25-
EMAIL_PORT: 2500
26-
EMAIL_USERNAME: test
27-
EMAIL_PASSWORD: none
28-
EMAIL_SENDER: noreply@test.com
24+
STACK_EMAIL_HOST: 0.0.0.0
25+
STACK_EMAIL_PORT: 2500
26+
STACK_EMAIL_USERNAME: test
27+
STACK_EMAIL_PASSWORD: none
28+
STACK_EMAIL_SENDER: noreply@test.com
2929

30-
DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
31-
DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
30+
STACK_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
31+
STACK_DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
3232

3333
strategy:
3434
matrix:

.github/workflows/preview-docs.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
NEXT_PUBLIC_STACK_PROJECT_ID: internal
1111
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY: internal-project-publishable-client-key
1212
STACK_SECRET_SERVER_KEY: internal-project-secret-server-key
13-
SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
13+
STACK_SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
1414

15-
EMAIL_HOST: 0.0.0.0
16-
EMAIL_PORT: 2500
17-
EMAIL_USERNAME: test
18-
EMAIL_PASSWORD: none
19-
EMAIL_SENDER: noreply@test.com
15+
STACK_EMAIL_HOST: 0.0.0.0
16+
STACK_EMAIL_PORT: 2500
17+
STACK_EMAIL_USERNAME: test
18+
STACK_EMAIL_PASSWORD: none
19+
STACK_EMAIL_SENDER: noreply@test.com
2020

21-
DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
22-
DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
21+
STACK_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
22+
STACK_DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
2323

2424
permissions: write-all
2525

.github/workflows/publish-docs.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
NEXT_PUBLIC_STACK_PROJECT_ID: internal
1414
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY: internal-project-publishable-client-key
1515
STACK_SECRET_SERVER_KEY: internal-project-secret-server-key
16-
SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
16+
STACK_SERVER_SECRET: 23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
1717

18-
EMAIL_HOST: 0.0.0.0
19-
EMAIL_PORT: 2500
20-
EMAIL_USERNAME: test
21-
EMAIL_PASSWORD: none
22-
EMAIL_SENDER: noreply@test.com
18+
STACK_EMAIL_HOST: 0.0.0.0
19+
STACK_EMAIL_PORT: 2500
20+
STACK_EMAIL_USERNAME: test
21+
STACK_EMAIL_PASSWORD: none
22+
STACK_EMAIL_SENDER: noreply@test.com
2323

24-
DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
25-
DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
24+
STACK_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
25+
STACK_DIRECT_DATABASE_CONNECTION_STRING: postgres://postgres:password@localhost:5432/stackframe
2626

2727
permissions: write-all
2828

apps/backend/.env

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
# Basic
2-
SERVER_SECRET=# enter a secret key generated by `pnpm generate-keys` here. This is used to sign the JWT tokens.
2+
STACK_SERVER_SECRET=# enter a secret key generated by `pnpm generate-keys` here. This is used to sign the JWT tokens.
33

44
# OAuth shared keys
55
# Can be omitted if shared OAuth keys are not needed
6-
GITHUB_CLIENT_ID=# client
7-
GITHUB_CLIENT_SECRET=# client secret
8-
GOOGLE_CLIENT_ID=# client id
9-
GOOGLE_CLIENT_SECRET=# client secret
10-
FACEBOOK_CLIENT_ID=# client id
11-
FACEBOOK_CLIENT_SECRET=# client secret
12-
MICROSOFT_CLIENT_ID=# client id
13-
MICROSOFT_CLIENT_SECRET=# client secret
14-
SPOTIFY_CLIENT_ID=# client id
15-
SPOTIFY_CLIENT_SECRET=# client secret
6+
STACK_GITHUB_CLIENT_ID=# client
7+
STACK_GITHUB_CLIENT_SECRET=# client secret
8+
STACK_GOOGLE_CLIENT_ID=# client id
9+
STACK_GOOGLE_CLIENT_SECRET=# client secret
10+
STACK_FACEBOOK_CLIENT_ID=# client id
11+
STACK_FACEBOOK_CLIENT_SECRET=# client secret
12+
STACK_MICROSOFT_CLIENT_ID=# client id
13+
STACK_MICROSOFT_CLIENT_SECRET=# client secret
14+
STACK_SPOTIFY_CLIENT_ID=# client id
15+
STACK_SPOTIFY_CLIENT_SECRET=# client secret
1616

1717
# Email
1818
# For local development, you can spin up a local SMTP server like inbucket
19-
EMAIL_HOST=# for local inbucket: 0.0.0.0
20-
EMAIL_PORT=# for local inbucket: 2500
21-
EMAIL_USERNAME=# for local inbucket: test
22-
EMAIL_PASSWORD=# for local inbucket: none
23-
EMAIL_SENDER=# for local inbucket: noreply@test.com
19+
STACK_EMAIL_HOST=# for local inbucket: 0.0.0.0
20+
STACK_EMAIL_PORT=# for local inbucket: 2500
21+
STACK_EMAIL_USERNAME=# for local inbucket: test
22+
STACK_EMAIL_PASSWORD=# for local inbucket: none
23+
STACK_EMAIL_SENDER=# for local inbucket: noreply@test.com
2424

2525
# Database
2626
# For local development: `docker run -it --rm -e POSTGRES_PASSWORD=password -p "5432:5432" postgres`
27-
DATABASE_CONNECTION_STRING=# enter your connection string here. For local development: `postgres://postgres:password@localhost:5432/stack`
28-
DIRECT_DATABASE_CONNECTION_STRING=# enter your direct (unpooled or session mode) database connection string here. For local development: same as above
27+
STACK_DATABASE_CONNECTION_STRING=# enter your connection string here. For local development: `postgres://postgres:password@localhost:5432/stack`
28+
STACK_DIRECT_DATABASE_CONNECTION_STRING=# enter your direct (unpooled or session mode) database connection string here. For local development: same as above
2929

3030
# Misc, optional
3131
STACK_ACCESS_TOKEN_EXPIRATION_TIME=# enter the expiration time for the access token here. Optional, don't specify it for default value

apps/backend/.env.development

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
1+
STACK_SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
22

3-
DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
4-
DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
3+
STACK_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
4+
STACK_DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
55

66
NEXT_PUBLIC_DOC_URL=http://localhost:8104
77

8-
EMAIL_HOST=0.0.0.0
9-
EMAIL_PORT=2500
8+
STACK_EMAIL_HOST=0.0.0.0
9+
STACK_EMAIL_PORT=2500
1010
EMAIL_SECURE=false
11-
EMAIL_USERNAME=does not matter, ignored by Inbucket
12-
EMAIL_PASSWORD=does not matter, ignored by Inbucket
13-
EMAIL_SENDER=noreply@example.com
11+
STACK_EMAIL_USERNAME=does not matter, ignored by Inbucket
12+
STACK_EMAIL_PASSWORD=does not matter, ignored by Inbucket
13+
STACK_EMAIL_SENDER=noreply@example.com

apps/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"analyze-bundle": "ANALYZE_BUNDLE=1 npm run build",
1313
"start": "next start --port 8102",
1414
"codegen": "npm run prisma -- generate && npm run generate-docs",
15-
"psql": "npm run with-env -- bash -c 'psql $DATABASE_CONNECTION_STRING'",
15+
"psql": "npm run with-env -- bash -c 'psql $STACK_DATABASE_CONNECTION_STRING'",
1616
"prisma": "npm run with-env -- prisma",
1717
"lint": "next lint",
1818
"watch-docs": "npm run with-env -- chokidar --silent '../../**/*' -i '../../docs/**' -i '../../**/node_modules/**' -i '../../**/.next/**' -i '../../**/dist/**' -c 'tsx scripts/generate-docs.ts'",

apps/backend/prisma/schema.prisma

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ generator client {
77

88
datasource db {
99
provider = "postgresql"
10-
url = env("DATABASE_CONNECTION_STRING")
11-
directUrl = env("DIRECT_DATABASE_CONNECTION_STRING")
10+
url = env("STACK_DATABASE_CONNECTION_STRING")
11+
directUrl = env("STACK_DIRECT_DATABASE_CONNECTION_STRING")
1212
}
1313

1414
model Project {

apps/dashboard/.env

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,33 @@ NEXT_PUBLIC_STACK_URL=# enter your stack endpoint here, For local development: h
33
NEXT_PUBLIC_STACK_PROJECT_ID=internal
44
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=# enter your Stack publishable client key here. For local development, just enter a random string, then run `pnpm prisma migrate reset`
55
STACK_SECRET_SERVER_KEY=# enter your Stack secret client key here. For local development, do the same as above
6-
SERVER_SECRET=# enter a secret key generated by `pnpm generate-keys` here. This is used to sign the JWT tokens.
6+
STACK_SERVER_SECRET=# enter a secret key generated by `pnpm generate-keys` here. This is used to sign the JWT tokens.
77

88
# OAuth shared keys
99
# Can be omitted for local development, but shared OAuth keys will not work
10-
GITHUB_CLIENT_ID=# client
11-
GITHUB_CLIENT_SECRET=# client secret
12-
GOOGLE_CLIENT_ID=# client id
13-
GOOGLE_CLIENT_SECRET=# client secret
14-
FACEBOOK_CLIENT_ID=# client id
15-
FACEBOOK_CLIENT_SECRET=# client secret
16-
MICROSOFT_CLIENT_ID=# client id
17-
MICROSOFT_CLIENT_SECRET=# client secret
18-
SPOTIFY_CLIENT_ID=# client id
19-
SPOTIFY_CLIENT_SECRET=# client secret
10+
STACK_GITHUB_CLIENT_ID=# client
11+
STACK_GITHUB_CLIENT_SECRET=# client secret
12+
STACK_GOOGLE_CLIENT_ID=# client id
13+
STACK_GOOGLE_CLIENT_SECRET=# client secret
14+
STACK_FACEBOOK_CLIENT_ID=# client id
15+
STACK_FACEBOOK_CLIENT_SECRET=# client secret
16+
STACK_MICROSOFT_CLIENT_ID=# client id
17+
STACK_MICROSOFT_CLIENT_SECRET=# client secret
18+
STACK_SPOTIFY_CLIENT_ID=# client id
19+
STACK_SPOTIFY_CLIENT_SECRET=# client secret
2020

2121
# Email
2222
# For local development, you can spin up a local SMTP server like inbucket
23-
EMAIL_HOST=# for local inbucket: 0.0.0.0
24-
EMAIL_PORT=# for local inbucket: 2500
25-
EMAIL_USERNAME=# for local inbucket: test
26-
EMAIL_PASSWORD=# for local inbucket: none
27-
EMAIL_SENDER=# for local inbucket: noreply@test.com
23+
STACK_EMAIL_HOST=# for local inbucket: 0.0.0.0
24+
STACK_EMAIL_PORT=# for local inbucket: 2500
25+
STACK_EMAIL_USERNAME=# for local inbucket: test
26+
STACK_EMAIL_PASSWORD=# for local inbucket: none
27+
STACK_EMAIL_SENDER=# for local inbucket: noreply@test.com
2828

2929
# Database
3030
# For local development: `docker run -it --rm -e POSTGRES_PASSWORD=password -p "5432:5432" postgres`
31-
DATABASE_CONNECTION_STRING=# enter your connection string here. For local development: `postgres://postgres:password@localhost:5432/stack`
32-
DIRECT_DATABASE_CONNECTION_STRING=# enter your direct (unpooled or session mode) database connection string here. For local development: same as above
31+
STACK_DATABASE_CONNECTION_STRING=# enter your connection string here. For local development: `postgres://postgres:password@localhost:5432/stack`
32+
STACK_DIRECT_DATABASE_CONNECTION_STRING=# enter your direct (unpooled or session mode) database connection string here. For local development: same as above
3333

3434
# Misc, optional
3535
STACK_ACCESS_TOKEN_EXPIRATION_TIME=# enter the expiration time for the access token here. Optional, don't specify it for default value

apps/dashboard/.env.development

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
NEXT_PUBLIC_STACK_URL=http://localhost:8101
2-
SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
2+
STACK_SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
33

44
NEXT_PUBLIC_STACK_PROJECT_ID=internal
55
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=this-publishable-client-key-is-for-local-development-only
66
STACK_SECRET_SERVER_KEY=this-secret-server-key-is-for-local-development-only
77

8-
DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
9-
DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
8+
STACK_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
9+
STACK_DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
1010

1111
NEXT_PUBLIC_DOC_URL=http://localhost:8104
1212

13-
EMAIL_HOST=0.0.0.0
14-
EMAIL_PORT=2500
13+
STACK_EMAIL_HOST=0.0.0.0
14+
STACK_EMAIL_PORT=2500
1515
EMAIL_SECURE=false
16-
EMAIL_USERNAME=does not matter, ignored by Inbucket
17-
EMAIL_PASSWORD=does not matter, ignored by Inbucket
18-
EMAIL_SENDER=noreply@example.com
16+
STACK_EMAIL_USERNAME=does not matter, ignored by Inbucket
17+
STACK_EMAIL_PASSWORD=does not matter, ignored by Inbucket
18+
STACK_EMAIL_SENDER=noreply@example.com

apps/dashboard/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"analyze-bundle": "ANALYZE_BUNDLE=1 npm run build",
1313
"start": "next start --port 8101",
1414
"codegen": "npm run prisma -- generate",
15-
"psql": "npm run with-env -- bash -c 'psql $DATABASE_CONNECTION_STRING'",
15+
"psql": "npm run with-env -- bash -c 'psql $STACK_DATABASE_CONNECTION_STRING'",
1616
"prisma": "npm run with-env -- prisma",
1717
"lint": "next lint",
1818
"generate-keys": "npm run with-env -- tsx scripts/generate-keys.ts"

0 commit comments

Comments
 (0)