GPTfree api commited on
Commit
58a2ac1
·
verified ·
1 Parent(s): a50c7f7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -26
Dockerfile CHANGED
@@ -1,35 +1,25 @@
1
- # Use an official Python image as a base image
2
- FROM python:3.9-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Install git and required tools
8
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
 
10
- # Clone the repository
11
- RUN git clone https://github.com/Lightmoll/MigaduTrashmail.git .
12
 
13
- # Create a non-root user and group
14
- RUN groupadd -r appuser && useradd -r -g appuser appuser
15
 
16
- # Change ownership of the working directory
17
- RUN chown -R appuser:appuser /app
 
 
18
 
19
- # Create a virtual environment
20
- RUN python3 -m venv venv
21
 
22
- # Activate virtual environment and install requirements
23
- RUN . venv/bin/activate && pip install --upgrade pip && pip install -r requirements.txt
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"]