docker-compose.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. version: '3.8'
  2. services:
  3. visa-sentinel:
  4. build: .
  5. image: coordinator:latest
  6. container_name: coordinator-sentinel
  7. command: ["python3", "main.py", "sentinel"]
  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. - MIHOMO_BIN=/bin/mihomo
  20. - NODE_ID=${NODE_ID:-yecaoyun}
  21. deploy:
  22. resources:
  23. limits:
  24. cpus: '2.0'
  25. memory: 2G
  26. visa-booker:
  27. build: .
  28. image: coordinator:latest
  29. container_name: coordinator-booker
  30. command: ["python3", "main.py", "booker"]
  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=/opt/ungoogled-chromium/chrome
  42. - MIHOMO_BIN=/bin/mihomo
  43. - NODE_ID=${NODE_ID:-yecaoyun}
  44. deploy:
  45. resources:
  46. limits:
  47. cpus: '2.0'
  48. memory: 2G
  49. visa-standalone:
  50. build: .
  51. image: coordinator:latest
  52. container_name: coordinator-standalone
  53. command: ["python3", "main.py", "standalone"]
  54. restart: unless-stopped
  55. shm_size: '2gb'
  56. volumes:
  57. - ./config:/app/config
  58. - ./logs:/app/logs
  59. - ./data:/app/data
  60. - ./plugins:/app/plugins
  61. environment:
  62. - TZ=Asia/Shanghai
  63. - DISPLAY=:99
  64. - CHROME_BIN=/opt/ungoogled-chromium/chrome
  65. - MIHOMO_BIN=/bin/mihomo
  66. - NODE_ID=${NODE_ID:-yecaoyun}
  67. deploy:
  68. resources:
  69. limits:
  70. cpus: '2.0'
  71. memory: 2G
  72. visa-sweeper:
  73. build: .
  74. image: coordinator:latest
  75. container_name: coordinator-sweeper
  76. command: ["python3", "main_sweeper.py"]
  77. restart: unless-stopped
  78. volumes:
  79. - ./config:/app/config
  80. - ./data:/app/data
  81. - ./logs:/app/logs
  82. environment:
  83. - TZ=Asia/Shanghai
  84. - NODE_ID=${NODE_ID:-yecaoyun}
  85. deploy:
  86. resources:
  87. limits:
  88. cpus: '0.2'
  89. memory: 256M