Spaces:
Running
Running
GPTfree api
commited on
Update Dockerfile
Browse files- Dockerfile +16 -26
Dockerfile
CHANGED
@@ -1,35 +1,25 @@
|
|
1 |
-
# Use an official
|
2 |
-
FROM
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
8 |
-
RUN
|
9 |
|
10 |
-
#
|
11 |
-
RUN
|
12 |
|
13 |
-
#
|
14 |
-
RUN
|
15 |
|
16 |
-
#
|
17 |
-
|
|
|
|
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
-
|
25 |
-
# Switch to the non-root user
|
26 |
-
USER appuser
|
27 |
-
|
28 |
-
# Copy default_config.py to config.py
|
29 |
-
RUN cp default_config.py config.py
|
30 |
-
|
31 |
-
# Expose any necessary ports (if applicable, assuming 8000 as default)
|
32 |
-
EXPOSE 8000
|
33 |
-
|
34 |
-
# Set the command to run the application
|
35 |
-
CMD ["/bin/bash", "-c", ". venv/bin/activate && python3 server.py"]
|
|
|
1 |
+
# Use an official Node.js runtime as a parent image
|
2 |
+
FROM node:16
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Clone the Rammerhead repository
|
8 |
+
RUN git clone https://github.com/s-tn/rammerhead-heroku.git .
|
9 |
|
10 |
+
# Install dependencies
|
11 |
+
RUN npm install
|
12 |
|
13 |
+
# Build the project
|
14 |
+
RUN npm run build
|
15 |
|
16 |
+
# Copy configuration file (if needed, override src/config.js or add config.js in the root directory)
|
17 |
+
# You can uncomment the lines below and provide your own config if required.
|
18 |
+
# ADD your-config.js /app/src/config.js
|
19 |
+
# ADD your-config.js /app/config.js
|
20 |
|
21 |
+
# Expose the necessary port (assuming 8080 is the default, update if needed)
|
22 |
+
EXPOSE 8080
|
23 |
|
24 |
+
# Start the Rammerhead server
|
25 |
+
CMD ["node", "src/server.js"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|