PVPPRO commited on
Commit
8fe4101
·
verified ·
1 Parent(s): 3a5ef86

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -14
Dockerfile CHANGED
@@ -1,32 +1,27 @@
1
- # 1. Use Node.js 20
2
  FROM node:20-alpine
3
 
4
- # 2. Install pnpm globally
5
  RUN npm install -g pnpm
6
 
7
- # 3. Set the working directory
8
  WORKDIR /app
9
 
10
- # 4. Copy configuration files
11
  COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./
12
  COPY tsconfig.json tsconfig.base.json ./
13
 
14
- # 5. Copy the entire project
15
  COPY . .
16
 
17
- # 6. Install dependencies
18
  RUN pnpm install --frozen-lockfile
19
 
20
- # 7. BUILD LIBRARIES using your existing script
21
- # This runs 'tsc --build' which builds lib/db, lib/api-zod, etc. in order
22
- RUN pnpm run typecheck:libs
23
-
24
- # 8. Now build the rest of the project
25
  RUN pnpm run build
26
 
27
- # 9. Hugging Face port configuration
28
  ENV PORT=7860
29
  EXPOSE 7860
30
 
31
- # 10. Start the server
32
- CMD ["pnpm", "start"]
 
1
+ # Use Node.js 20
2
  FROM node:20-alpine
3
 
4
+ # Install pnpm
5
  RUN npm install -g pnpm
6
 
 
7
  WORKDIR /app
8
 
9
+ # Copy configuration files
10
  COPY pnpm-lock.yaml pnpm-workspace.yaml package.json .npmrc ./
11
  COPY tsconfig.json tsconfig.base.json ./
12
 
13
+ # Copy the rest of the project
14
  COPY . .
15
 
16
+ # Install dependencies
17
  RUN pnpm install --frozen-lockfile
18
 
19
+ # Build the libraries and then the apps
 
 
 
 
20
  RUN pnpm run build
21
 
22
+ # Set the Hugging Face mandatory port
23
  ENV PORT=7860
24
  EXPOSE 7860
25
 
26
+ # Start the multiplayer server
27
+ CMD ["pnpm", "run", "start"]