Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Node runtime as a parent image
|
| 2 |
+
FROM node:22-alpine
|
| 3 |
+
|
| 4 |
+
# Set the working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy package.json and package-lock.json
|
| 8 |
+
COPY package*.json ./
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN npm install
|
| 12 |
+
|
| 13 |
+
# Copy the rest of the application code
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Build the frontend and backend
|
| 17 |
+
RUN npm run build
|
| 18 |
+
|
| 19 |
+
# Set environment to production
|
| 20 |
+
ENV NODE_ENV=production
|
| 21 |
+
|
| 22 |
+
# Expose Web/Proxy port (3000) and RTMP Ingest port (1935)
|
| 23 |
+
EXPOSE 3000 1935
|
| 24 |
+
|
| 25 |
+
# Start the production server
|
| 26 |
+
CMD ["npm", "start"]
|