ilhamdev commited on
Commit
d91d7a7
·
verified ·
1 Parent(s): 60d6880

Create Dockerfile.backend

Browse files
Files changed (1) hide show
  1. Dockerfile.backend +26 -0
Dockerfile.backend ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Node runtime as a parent image
2
+ FROM node:18
3
+
4
+ # Install nodemon globally
5
+ RUN npm install -g nodemon
6
+
7
+ # Create a directory for the application
8
+ WORKDIR /app/backend
9
+
10
+ # Copy package.json and package-lock.json
11
+ COPY backend/package*.json ./
12
+
13
+ # Install dependencies
14
+ RUN npm install
15
+
16
+ # Copy the rest of the application code
17
+ COPY backend .
18
+
19
+ # Ensure correct permissions for the Stockfish binary
20
+ RUN chmod +x /app/backend/engine/stockfish
21
+
22
+ # Expose the port
23
+ EXPOSE 3000
24
+
25
+ # Define the command to run the backend app
26
+ CMD ["npm", "run", "dev"]