-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add environment variables and update code based on environment in ser…
…ver files
- Loading branch information
1 parent
2e388fc
commit f3a7663
Showing
8 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
APP_KEY= | ||
APP_NAME= | ||
# Env vars added by Remix Forge | ||
APP_URL="http://localhost:3000" | ||
SESSION_SECRET="{{uuid}}" | ||
|
||
SESSION_SECRET= | ||
# auth0 Env Variables | ||
AUTH0_CLIENT_ID="" | ||
AUTH0_CLIENT_SECRET="" | ||
AUTH0_DOMAIN="" | ||
|
||
# Database Env Variables | ||
DATABASE_URL="postgresql://{{docker:postgres.POSTGRES_USER}}:{{docker:postgres.POSTGRES_PASSWORD}}@localhost:5432/{{docker:postgres.POSTGRES_DB}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import configure from "env-refiner"; | ||
import zod from "zod"; | ||
|
||
export const Env = configure({ | ||
schema: zod.object({ | ||
APP_URL: zod.string().url(), | ||
SESSION_SECRET: zod.string(), | ||
|
||
AUTH0_CLIENT_ID: zod.string(), | ||
AUTH0_CLIENT_SECRET: zod.string(), | ||
AUTH0_DOMAIN: zod.string(), | ||
|
||
DATABASE_URL: zod.string().url(), | ||
}), | ||
}); | ||
export default Env; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: "3.7" | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
restart: always | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=dev | ||
ports: | ||
- "5432:5432" | ||
# volumes: | ||
# # - ./scripts/pg-init:/docker-entrypoint-initdb.d | ||
# - ./postgres-data:/var/lib/postgresql/data | ||
adminer: | ||
image: adminer | ||
restart: always | ||
ports: | ||
- 8080:8080 | ||
environment: | ||
- ADMINER_DEFAULT_SERVER=postgres | ||
- ADMINER_DESIGN=dracula |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters