File size: 694 Bytes
9651cde
 
44cc3ee
9651cde
44cc3ee
 
9651cde
 
44cc3ee
9651cde
 
44cc3ee
9651cde
 
 
226485d
 
9651cde
226485d
 
 
 
 
 
4dfe313
 
226485d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use an official Node.js runtime as a parent image
FROM node:18

# Set the working directory in the container
WORKDIR /app

# Copy the package.json and package-lock.json files
COPY package*.json ./

# Install the Node.js dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Install Nginx
RUN apt-get update && apt-get install -y nginx

# Remove the default Nginx configuration file
RUN rm /etc/nginx/sites-enabled/default

# Copy your Nginx configuration
COPY nginx.conf /etc/nginx/sites-enabled/

# Expose both ports: 7860 for Nginx and 6060 for WebSocket backend
EXPOSE 7860 6060

# Start both Nginx and Node.js backend
CMD service nginx start && node server.js