diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1ec915e --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/package.json b/package.json index 42a462b..d1b5444 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/server/router/workspace.ts b/src/server/router/workspace.ts index 667a0e8..6594a6a 100644 --- a/src/server/router/workspace.ts +++ b/src/server/router/workspace.ts @@ -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';