docker-compose.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # - DISPLAY=:99
  18. # - CHROME_BIN=/usr/bin/chromium
  19. # # 资源限制
  20. # deploy:
  21. # resources:
  22. # limits:
  23. # cpus: '2.0'
  24. # memory: 4G
  25. visa-booker:
  26. build: .
  27. image: coordinator:latest
  28. container_name: coordinator-booker
  29. command: ["python3", "main_booker.py"]
  30. restart: unless-stopped
  31. shm_size: '2gb'
  32. volumes:
  33. - ./config:/app/config
  34. - ./logs:/app/logs
  35. - ./data:/app/data
  36. - ./plugins:/app/plugins
  37. environment:
  38. - TZ=Asia/Shanghai
  39. - DISPLAY=:99
  40. - CHROME_BIN=/usr/bin/chromium
  41. # 资源限制
  42. deploy:
  43. resources:
  44. limits:
  45. cpus: '2.0'
  46. memory: 4G
  47. visa-sweeper:
  48. build: .
  49. image: coordinator:latest
  50. container_name: coordinator-sweeper
  51. command: ["python3", "main_sweeper.py"]
  52. restart: unless-stopped
  53. volumes:
  54. - ./config:/app/config
  55. - ./logs:/app/logs
  56. environment:
  57. - TZ=Asia/Shanghai
  58. # 资源限制极低,因为它只是个网络请求脚本,不运行浏览器
  59. deploy:
  60. resources:
  61. limits:
  62. cpus: '0.2'
  63. memory: 256M