clone3 commited on
Commit
226485d
1 Parent(s): 93a5f38

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -13,8 +13,17 @@ RUN npm install
13
  # Copy the rest of the application code
14
  COPY . .
15
 
16
- # Expose the WebSocket port
17
- EXPOSE 6060
18
 
19
- # Start the backend server
20
- CMD ["node", "server.js"]
 
 
 
 
 
 
 
 
 
 
13
  # Copy the rest of the application code
14
  COPY . .
15
 
16
+ # Install Nginx
17
+ RUN apt-get update && apt-get install -y nginx
18
 
19
+ # Remove the default Nginx configuration file
20
+ RUN rm /etc/nginx/sites-enabled/default
21
+
22
+ # Copy your Nginx configuration
23
+ COPY nginx.conf /etc/nginx/sites-enabled/
24
+
25
+ # Expose both ports: one for Nginx and one for WebSocket
26
+ EXPOSE 80 6060
27
+
28
+ # Start both Nginx and Node.js backend
29
+ CMD service nginx start && node server.js