diff --git a/Dockerfile b/Dockerfile index 1ec915e..dcfdd0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN pnpm build EXPOSE 12345 -CMD ["pnpm", "start:pro"] +CMD ["pnpm", "start:docker"] diff --git a/package.json b/package.json index d1b5444..f7c178a 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "version": "0.0.0", "scripts": { "dev": "nodemon", - "start": "NODE_ENV=production ts-node src/server/main.ts", - "start:pro": "node ./dist/server/main.js", + "start": "NODE_ENV=production node ./dist/server/main.js", + "start:docker": "pnpm db:migrate && pnpm db:generate && pnpm start", "build": "pnpm build:client && pnpm build:server && pnpm build:tracker && pnpm build:geo", "build:client": "vite build", "build:server": "tsc -p tsconfig.server.json", @@ -14,6 +14,7 @@ "check:type": "tsc --noEmit --skipLibCheck --module esnext", "db:push": "prisma db push", "db:generate": "prisma generate", + "db:migrate": "prisma migrate deploy", "db:studio": "prisma studio" }, "dependencies": {