Skip to content

Commit

Permalink
feat: docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
marklai1998 committed Jun 17, 2023
1 parent 3a85510 commit b68f5c0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:18
COPY . /app
WORKDIR /app
RUN npm i -g pnpm
RUN pnpm i
RUN pnpm run build
CMD node --experimental-specifier-resolution=node ./dist/index.js
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsc --project tsconfig.build.json",
"tsc": "tsc"
},
"dependencies": {
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"outDir": "./dist",
"target": "ESNext",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
Expand Down

0 comments on commit b68f5c0

Please sign in to comment.