Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +17 -5
Dockerfile
CHANGED
@@ -1,11 +1,23 @@
|
|
1 |
-
#
|
2 |
FROM node:18-alpine
|
3 |
|
4 |
-
#
|
|
|
5 |
|
|
|
|
|
6 |
|
7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
EXPOSE 8000
|
9 |
|
10 |
-
#
|
11 |
-
CMD ["
|
|
|
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"]
|