diff --git a/.gitignore b/.gitignore index 24e96b7..06fb9fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# Build +build/ + + + # Logs logs *.log diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8453374 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3.8" + +services: + status-monitor: + build: . + container_name: status-monitor + restart: unless-stopped + ports: + - "3001:3001" + environment: + - NODE_ENV=production + volumes: + - ./data:/app/data # 持久化数据 + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + deploy: + resources: + limits: + cpus: "1" + memory: 512M