Skip to content

Commit b7e1b45

Browse files
committed
Standardize configs among containers
Signed-off-by: SeeuSim <[email protected]>
1 parent 0be7734 commit b7e1b45

File tree

4 files changed

+41
-9
lines changed

4 files changed

+41
-9
lines changed

backend/collaboration/tsconfig.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
"module": "commonjs", /* Specify what module code is generated. */
2626
"rootDir": "./src", /* Specify the root folder within your source files. */
2727
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
28-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
28+
"baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */
29+
"paths": {
30+
"@/*": ["./src/*"]
31+
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3032
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
3133
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
3234
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
@@ -100,5 +102,9 @@
100102
},
101103
"exclude": [
102104
"drizzle.*.*ts"
103-
]
105+
],
106+
"ts-node": {
107+
"swc": true,
108+
"require": ["tsconfig-paths/register"]
109+
}
104110
}

backend/question/tsconfig.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
"module": "commonjs", /* Specify what module code is generated. */
2626
"rootDir": "./src", /* Specify the root folder within your source files. */
2727
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
28-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
28+
"baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */
29+
"paths": {
30+
"@/*": ["./src/*"]
31+
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3032
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
3133
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
3234
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
@@ -100,5 +102,9 @@
100102
},
101103
"exclude": [
102104
"drizzle.*.*ts"
103-
]
105+
],
106+
"ts-node": {
107+
"swc": true,
108+
"require": ["tsconfig-paths/register"]
109+
}
104110
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:lts-alpine AS build
2+
WORKDIR /data/user-express
3+
COPY package*.json ./
4+
RUN npm install
5+
COPY . .
6+
RUN npm run build
7+
8+
FROM node:lts-alpine AS production
9+
WORKDIR /data/user-express
10+
COPY --from=build /data/user-express/package*.json ./
11+
RUN npm ci --omit=dev
12+
COPY --from=build --chown=node:node /data/user-express/dist ./dist
13+
EXPOSE 8001
14+
ENTRYPOINT ["node", "dist/index.js"]

backend/template/tsconfig.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
"module": "commonjs", /* Specify what module code is generated. */
2626
"rootDir": "./src", /* Specify the root folder within your source files. */
2727
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
28-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
28+
"baseUrl": ".", /* Specify the base directory to resolve non-relative module names. */
29+
"paths": {
30+
"@/*": ["./src/*"]
31+
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3032
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
3133
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
3234
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
@@ -100,5 +102,9 @@
100102
},
101103
"exclude": [
102104
"drizzle.*.*ts"
103-
]
105+
],
106+
"ts-node": {
107+
"swc": true,
108+
"require": ["tsconfig-paths/register"]
109+
}
104110
}

0 commit comments

Comments
 (0)