gaialive commited on
Commit
c83bf0e
·
verified ·
1 Parent(s): 639a559

Upload 2 files

Browse files
Files changed (2) hide show
  1. .gitignore +3 -2
  2. Dockerfile +24 -0
.gitignore CHANGED
@@ -3,11 +3,12 @@ node_modules/
3
  */node_modules/
4
 
5
  # Production builds
6
- build/
7
  dist/
8
- */build/
9
  */dist/
10
 
 
 
 
11
  # Environment variables
12
  .env
13
  .env.local
 
3
  */node_modules/
4
 
5
  # Production builds
 
6
  dist/
 
7
  */dist/
8
 
9
+ # Allow the frontend build artifacts to be checked in
10
+ !/web/build
11
+
12
  # Environment variables
13
  .env
14
  .env.local
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a Node.js LTS version that includes Python and build tools
2
+ FROM node:18-bullseye
3
+
4
+ # Set the working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy the entire project, including the pre-built frontend
8
+ COPY . .
9
+
10
+ # Install System Dependencies required for the backend
11
+ RUN apt-get update && apt-get install -y python3 python3-pip build-essential && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Install only production dependencies for the backend and root
14
+ RUN npm install --omit=dev
15
+
16
+ # Install Python dependencies
17
+ RUN pip3 install --no-cache-dir -r backend/python/requirements.txt
18
+
19
+ # --- Final Configuration ---
20
+ ENV PORT=7860
21
+ EXPOSE 7860
22
+
23
+ # Define the command to start the production server
24
+ CMD ["node", "backend/server.js"]