Skip to content

Commit 397cc18

Browse files
committed
Env updates
1 parent 4e3f04b commit 397cc18

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ app.env
2222
.env.development.local
2323
.env.test.local
2424
.env.production.local
25+
server/.env
2526

2627
npm-debug.log*
2728
yarn-debug.log*

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ version: "3.4"
33
services:
44
server:
55
build: ./server
6+
env_file:
7+
- server/.env
68
ports:
79
# allow override of published port
810
- "127.0.0.1:${EXTERNAL_PORT:-9000}:8000"

server/config.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
const defaultEnv = {
2-
// PUBLIC_URL: 'http://localhost:8000',
3-
PUBLIC_URL: 'https://smart-health-links-server.cirg.washington.edu',
1+
interface Config {
2+
PUBLIC_URL: string;
3+
EMBEDDED_LENGTH_MAX: number;
4+
FILE_SIZE_MAX: number;
5+
APP_VERSION_STRING?: string;
6+
PORT?: number;
7+
JWKS_URL?: string;
8+
};
9+
10+
const defaultEnv: Config = {
11+
PUBLIC_URL: 'http://localhost:8000',
412
FILE_SIZE_MAX: 1024 * 1024 * 100, // 100 MB
513
EMBEDDED_LENGTH_MAX: 10_000, // 10 KB
14+
APP_VERSION_STRING: "",
15+
PORT: 8000,
616
JWKS_URL: "",
717
};
818

server/default.env

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Server base URL
2+
PUBLIC_URL=
3+
4+
# Max size for returned manifest files
5+
#EMBEDDED_LENGTH_MAX=
6+
7+
# Max size for uploaded files
8+
#FILE_SIZE_MAX=
9+
10+
# VCS version string if not using CI image
11+
#APP_VERSION_STRING=
12+
13+
# local deploy server port
14+
#PORT=
15+
16+
# IDP jwks url for jwt auth
17+
#JWKS_URL=

0 commit comments

Comments
 (0)