GPTfree api commited on
Commit
f87725d
·
verified ·
1 Parent(s): c94e6b6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use an official Node.js runtime as a parent image
2
  FROM node:16
3
 
4
  # Set the working directory in the container
@@ -7,16 +7,16 @@ WORKDIR /app
7
  # Clone the Rammerhead repository
8
  RUN git clone https://github.com/s-tn/rammerhead-heroku.git .
9
 
10
- # Ensure the latest npm version is used
11
- RUN npm install -g npm@latest
12
 
13
- # Install dependencies safely
14
  RUN npm install --legacy-peer-deps
15
 
16
  # Build the project
17
- RUN npm run build || npm run bstart
18
 
19
- # Expose the necessary port (assuming 8080 is the default, update if needed)
20
  EXPOSE 8080
21
 
22
  # Start the Rammerhead server
 
1
+ # Use an official Node.js runtime (lock to v16 compatible with [email protected])
2
  FROM node:16
3
 
4
  # Set the working directory in the container
 
7
  # Clone the Rammerhead repository
8
  RUN git clone https://github.com/s-tn/rammerhead-heroku.git .
9
 
10
+ # Ensure a compatible npm version (do not upgrade beyond [email protected])
11
+ RUN npm install -g npm@8.19.4
12
 
13
+ # Install dependencies (use --legacy-peer-deps to handle potential dependency conflicts)
14
  RUN npm install --legacy-peer-deps
15
 
16
  # Build the project
17
+ RUN npm run build
18
 
19
+ # Expose the necessary port (adjust if the server uses a different port)
20
  EXPOSE 8080
21
 
22
  # Start the Rammerhead server