Move environment variables to .env
parent
6322a6db14
commit
2ef965f749
|
@ -7,11 +7,7 @@ services:
|
||||||
- db
|
- db
|
||||||
volumes:
|
volumes:
|
||||||
- .:/home/app
|
- .:/home/app
|
||||||
environment:
|
env_file: .env
|
||||||
PGHOST: db
|
|
||||||
PGDATABASE: postgres
|
|
||||||
PGUSER: postgres
|
|
||||||
SESSION_SECRET: REPLACE_THIS_SECRET
|
|
||||||
db:
|
db:
|
||||||
container_name: learn-request-queue-db
|
container_name: learn-request-queue-db
|
||||||
image: postgres
|
image: postgres
|
||||||
|
|
|
@ -4,6 +4,12 @@ if (!process.env.PORT) {
|
||||||
}
|
}
|
||||||
export const port: number = parseInt(process.env.PORT as string, 10);
|
export const port: number = parseInt(process.env.PORT as string, 10);
|
||||||
|
|
||||||
|
if (!process.env.TWITCH_SECRET) {
|
||||||
|
console.log("Missing environment variable TWITCH_SECRET");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
export const twitchSecret: string = process.env.TWITCH_SECRET;
|
||||||
|
|
||||||
if (!process.env.SESSION_SECRET) {
|
if (!process.env.SESSION_SECRET) {
|
||||||
console.log("Missing environment variable SESSION_SECRET");
|
console.log("Missing environment variable SESSION_SECRET");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
Loading…
Reference in New Issue