diff --git a/.dockerignore b/.dockerignore index 96c2354..3f84d86 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ node_modules sqlite.db .DS_Store dist +.env diff --git a/.gitignore b/.gitignore index 96c2354..3f84d86 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules sqlite.db .DS_Store dist +.env diff --git a/compose.yml b/compose.yml index 7eef6b4..5900739 100644 --- a/compose.yml +++ b/compose.yml @@ -8,3 +8,5 @@ services: - 3001:3001 volumes: - ./sqlite.db:/app/sqlite.db + env_file: + - .env diff --git a/src/config.ts b/src/config.ts index 778473a..dc4bc36 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,6 +1,7 @@ export const Config = { jwt_secret: + process.env.JWT_SECRET || "T4kE6/tIqCVEZYg9lwsqeJjYfOoXTXSXDEMyParsJjj57CjSdkrfPOLWP74/9lJpcBA=", - token_duration: "365d", - api_url: "http://localhost:3000", + token_duration: process.env.TOKEN_DURATION || "365d", + api_url: process.env.API_URL || "http://localhost:3000", };