Skip to content

Commit 2febb2a

Browse files
committed
Move ts compilate to docker file
1 parent a5e57b2 commit 2febb2a

3 files changed

Lines changed: 555 additions & 2 deletions

File tree

live-demo/app/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN corepack prepare pnpm@latest-10 --activate
66
RUN pnpm i
77
ADD . /code/
88
RUN pnpm bundleNow
9+
RUN pnpm run build
910

1011

1112
CMD ["pnpm", "run", "startLive"]

live-demo/app/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"start": "tsx --env-file=.env --watch index.ts",
88
"test": "echo \"Error: no test specified\" && exit 1",
99
"bundleNow": "tsx bundleNow.ts",
10-
"startLive": "prisma migrate deploy && tsx index.ts",
10+
"build": "tsup index.ts --format esm --clean",
11+
"startLive": "prisma migrate deploy && node dist/index.js",
1112
"migrate": "prisma migrate deploy",
1213
"makemigration": "prisma migrate dev"
1314
},
@@ -47,7 +48,8 @@
4748
"devDependencies": {
4849
"dotenv": "^16.4.5",
4950
"prisma": "^6.1.0",
51+
"tsup": "^8.5.1",
5052
"tsx": "^4.11.2",
5153
"typescript": "^5.4.5"
5254
}
53-
}
55+
}

0 commit comments

Comments
 (0)