Jofthomas HF staff commited on
Commit
581358a
·
verified ·
1 Parent(s): d5570f4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -11
Dockerfile CHANGED
@@ -1,23 +1,28 @@
1
- # Use Node.js 18 (Alpine)
2
  FROM node:18-alpine
3
 
4
- # Install Git (optional unless Showdown needs Git, but let's keep it)
5
- RUN apk add --no-cache git
6
-
7
- # Set up working directory in the container
8
  WORKDIR /app
9
 
10
- # Copy your local files into the container
 
 
 
11
  COPY . /app
12
 
13
- # Install dependencies
14
  RUN npm install
15
 
16
- # Copy config-example.js to config.js (or provide your own config.js if desired)
17
- RUN cp config/config-example.js config/config.js
 
 
18
 
19
- # Expose the Showdown default port
20
  EXPOSE 8000
21
 
22
- # Start the server
 
 
 
23
  CMD ["node", "pokemon-showdown", "start"]
 
1
+ # 1. Use Node 18 (Alpine)
2
  FROM node:18-alpine
3
 
4
+ # 2. Set up our working directory
 
 
 
5
  WORKDIR /app
6
 
7
+ # 3. Install any system packages we may need
8
+ RUN apk add --no-cache git
9
+
10
+ # 4. Copy local files into the container
11
  COPY . /app
12
 
13
+ # 5. Install dependencies
14
  RUN npm install
15
 
16
+ # 6. Build or transpile, if Pokémon Showdown requires it
17
+ # If Showdown has a "build" script, run it here.
18
+ # In the official repo, there's a `build` script that compiles TS -> JS:
19
+ RUN npm run build
20
 
21
+ # 7. Expose the default port
22
  EXPOSE 8000
23
 
24
+ # 8. Start the server
25
+ # If Showdown is built into "dist", you might do:
26
+ # CMD ["node", "dist/pokemon-showdown", "start"]
27
+ # Otherwise, if the original scripts remain, it might be:
28
  CMD ["node", "pokemon-showdown", "start"]