chore: add dockerfile

This commit is contained in:
moonrailgun 2023-10-17 19:41:42 +08:00
parent 54af2874e4
commit 0b2f4b7e62
3 changed files with 16 additions and 2 deletions

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM node:lts-alpine
WORKDIR /app/tailchat
RUN npm install -g pnpm@8.3.1
COPY . .
RUN pnpm install --frozen-lockfile
RUN pnpm build
EXPOSE 12345
CMD ["pnpm", "start:pro"]

View File

@ -5,6 +5,7 @@
"scripts": {
"dev": "nodemon",
"start": "NODE_ENV=production ts-node src/server/main.ts",
"start:pro": "node ./dist/server/main.js",
"build": "pnpm build:client && pnpm build:server && pnpm build:tracker && pnpm build:geo",
"build:client": "vite build",
"build:server": "tsc -p tsconfig.server.json",

View File

@ -6,12 +6,10 @@ import { workspacePermission } from '../middleware/workspace';
import {
addWorkspaceWebsite,
deleteWorkspaceWebsite,
getWorkspaceWebsiteInfo,
getWorkspaceWebsitePageview,
getWorkspaceWebsites,
getWorkspaceWebsiteSession,
getWorkspaceWebsiteStats,
updateWorkspaceWebsiteInfo,
} from '../model/workspace';
import { parseDateRange } from '../utils/common';
import { ROLES } from '../utils/const';