File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM node:20-alpine
22
3- # Set up monorepo structure
3+ # Create workspace structure
44WORKDIR /workspace
55
6- # Copy server package files and install dependencies
6+ # Copy shared first
7+ COPY shared/ ./shared/
8+
9+ # Copy server package files
710COPY server/package*.json ./server/
811WORKDIR /workspace/server
12+
13+ # Install dependencies
914RUN npm install --production
1015
11- # Copy all source code
16+ # Copy server source
1217WORKDIR /workspace
1318COPY server/ ./server/
14- COPY shared/ ./shared/
1519
16- # Set working directory to server
20+ # Set final working directory
1721WORKDIR /workspace/server
1822
1923# Environment
2024ENV NODE_ENV=production
25+ ENV TSX_TSCONFIG_PATH=/workspace/server/tsconfig.json
2126EXPOSE 5000
2227
23- # Run tsx directly
24- CMD ["node_modules/.bin/ tsx" , "index.ts" ]
28+ # Run tsx with proper node options
29+ CMD ["node" , "--import" , " tsx" , "index.ts" ]
You can’t perform that action at this time.
0 commit comments