增加docker 配置文件

master
old易 2025-03-29 15:58:28 +08:00
parent 95eda06dbc
commit 36971ee828
2 changed files with 28 additions and 0 deletions

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3001
CMD ["node", "app.js"]

15
docker-compose.yml Normal file
View File

@ -0,0 +1,15 @@
version: '3'
services:
rtc-server:
build:
context: .
dockerfile: Dockerfile
container_name: rtc-server
ports:
- "3001:3001"
environment:
- NODE_ENV=production
restart: always
volumes:
- ./logs:/app/logs