docker-compose.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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", "--config", "config/config.json"]
  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=/opt/ungoogled-chromium/chrome
  19. # 资源限制
  20. deploy:
  21. resources:
  22. limits:
  23. cpus: '2.0'
  24. memory: 6G
  25. visa-booker:
  26. build: .
  27. image: coordinator:latest
  28. container_name: coordinator-booker
  29. command: ["python3", "main_booker.py", "--config", "config/config.json"]
  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=/opt/ungoogled-chromium/chrome
  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. - ./data:/app/data
  56. - ./logs:/app/logs
  57. environment:
  58. - TZ=Asia/Shanghai
  59. # 资源限制极低,因为它只是个网络请求脚本,不运行浏览器
  60. deploy:
  61. resources:
  62. limits:
  63. cpus: '0.2'
  64. memory: 256M
  65. registration-bot:
  66. build: .
  67. image: coordinator:latest
  68. container_name: tls-bot-worker
  69. environment:
  70. - CAPSOLVER_KEY=CAP-5441DD341DD3CC2FAEF0BE6FE493EE9A
  71. command: ["python3", "-u" ,"tls_registration_bot.py", "-n", "1", "-m", "50", "-p", "isp_all", "-u", "https://visas-fr.tlscontact.com/en-us/country/gb/vac/gbLON2fr"]
  72. volumes:
  73. - ./config:/app/config
  74. - ./data:/app/data
  75. deploy:
  76. resources:
  77. limits:
  78. memory: 2G