docker-compose.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. services:
  2. redis:
  3. image: redis:7.2.4
  4. deploy:
  5. resources:
  6. limits:
  7. cpus: '0.5'
  8. memory: 128M
  9. ports:
  10. - "127.0.0.1:6379:6379"
  11. web:
  12. build:
  13. context: .
  14. dockerfile: ./web/Dockerfile
  15. deploy:
  16. resources:
  17. limits:
  18. cpus: '0.5'
  19. memory: 512M
  20. environment:
  21. CBS_REDIS_HOST: redis
  22. CBS_REDIS_PORT: 6379
  23. CBS_BASEDIR: /base
  24. CBS_LOG_LEVEL: ${CBS_LOG_LEVEL:-INFO}
  25. CBS_ENABLE_INBUILT_BUILDER: 0
  26. CBS_GITHUB_ACCESS_TOKEN: ${CBS_GITHUB_ACCESS_TOKEN}
  27. CBS_REMOTES_RELOAD_TOKEN: ${CBS_REMOTES_RELOAD_TOKEN}
  28. PYTHONPATH: /app
  29. CBS_BUILD_TIMEOUT_SEC: ${CBS_BUILD_TIMEOUT_SEC:-900}
  30. volumes:
  31. - ./base:/base:rw
  32. depends_on:
  33. - redis
  34. ports:
  35. - "0.0.0.0:${WEB_PORT:-8080}:8080"
  36. builder:
  37. build:
  38. context: .
  39. dockerfile: ./builder/Dockerfile
  40. restart: always
  41. stop_grace_period: 5m
  42. # --- THE CPU MUZZLE ---
  43. deploy:
  44. resources:
  45. limits:
  46. cpus: '2.0'
  47. memory: 2G # Ardupilot builds need a decent chunk of RAM
  48. environment:
  49. CBS_REDIS_HOST: redis
  50. CBS_REDIS_PORT: 6379
  51. CBS_BASEDIR: /base
  52. CBS_LOG_LEVEL: ${CBS_LOG_LEVEL:-INFO}
  53. PYTHONPATH: /app
  54. CBS_BUILD_TIMEOUT_SEC: ${CBS_BUILD_TIMEOUT_SEC:-900}
  55. volumes:
  56. - ./base:/base:rw
  57. - ./custom_overlays:/app/custom_overlays:ro
  58. depends_on:
  59. - redis
  60. overlay-manager:
  61. build: ./overlay_manager
  62. restart: always
  63. pid: "service:builder"
  64. deploy:
  65. resources:
  66. limits:
  67. cpus: '0.5'
  68. memory: 256M
  69. environment:
  70. CBS_BUILD_TIMEOUT_SEC: ${CBS_BUILD_TIMEOUT_SEC:-900}
  71. volumes:
  72. - ./custom_overlays:/srv:rw
  73. - ./overlay_db:/app/db
  74. ports:
  75. - "0.0.0.0:11081:80"