docker-compose.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. version: '3.8'
  2. services:
  3. visa-sentinel:
  4. build: .
  5. image: coordinator:latest
  6. container_name: coordinator-sentinel
  7. command: ["python3", "main_sentinel.py"]
  8. restart: unless-stopped
  9. shm_size: '2gb'
  10. volumes:
  11. - ./config:/app/config
  12. - ./logs:/app/logs
  13. - ./data:/app/data
  14. - ./plugins:/app/plugins
  15. environment:
  16. - TZ=Asia/Shanghai
  17. # entrypoint 已启动 Xvfb :99,Camoufox 默认有头即可用虚拟屏;若改真无头可设: CAMOUFOX_HEADLESS=1
  18. - DISPLAY=:99
  19. - CHROME_BIN=/usr/bin/chromium
  20. # 资源限制
  21. deploy:
  22. resources:
  23. limits:
  24. cpus: '2.0'
  25. memory: 4G
  26. # visa-booker:
  27. # build: .
  28. # image: coordinator:latest
  29. # container_name: coordinator-booker
  30. # command: ["python3", "main_booker.py"]
  31. # restart: unless-stopped
  32. # shm_size: '2gb'
  33. # volumes:
  34. # - ./config:/app/config
  35. # - ./logs:/app/logs
  36. # - ./data:/app/data
  37. # - ./plugins:/app/plugins
  38. # environment:
  39. # - TZ=Asia/Shanghai
  40. # - DISPLAY=:99
  41. # - CHROME_BIN=/usr/bin/chromium
  42. # # 资源限制
  43. # deploy:
  44. # resources:
  45. # limits:
  46. # cpus: '2.0'
  47. # memory: 4G
  48. # visa-sweeper:
  49. # build: .
  50. # image: coordinator:latest
  51. # container_name: coordinator-sweeper
  52. # command: ["python3", "main_sweeper.py"]
  53. # restart: unless-stopped
  54. # volumes:
  55. # - ./config:/app/config
  56. # - ./logs:/app/logs
  57. # environment:
  58. # - TZ=Asia/Shanghai
  59. # # 资源限制极低,因为它只是个网络请求脚本,不运行浏览器
  60. # deploy:
  61. # resources:
  62. # limits:
  63. # cpus: '0.2'
  64. # memory: 256M