template.yaml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. ---
  2. kind: compose
  3. metadata:
  4. icon:
  5. provider: selfh
  6. id: komodo
  7. name: Komodo
  8. description: 'Build and deployment automation tool for managing software across multiple servers. Komodo provides
  9. unlimited server connections, flexible API access, and comprehensive management of Docker deployments,
  10. stacks, and builds. Features include real-time container monitoring, batch operations, and integration
  11. with Docker, Docker Compose, and build systems. Supports both MongoDB and FerretDB as database backends.
  12. ## Important Notes
  13. * Requires MongoDB or FerretDB for data storage (database not included in this template)
  14. * Requires Periphery agent on managed servers for remote operations
  15. * Web interface and API accessible through configured ports
  16. ## References
  17. * **Project:** https://github.com/moghtech/komodo
  18. * **Documentation:** https://github.com/moghtech/komodo/tree/main/docsite/docs
  19. * **Docker Hub:** https://hub.docker.com/r/moghtech/komodo
  20. '
  21. draft: true
  22. version: latest
  23. author: Christian Lempa
  24. date: '2025-11-13'
  25. tags:
  26. - traefik
  27. - swarm
  28. - deployment
  29. - automation
  30. next_steps: '### 1. Prerequisites
  31. * Deploy MongoDB or FerretDB database
  32. * Configure database connection in environment variables
  33. * Install Periphery agent on servers you want to manage
  34. ### 2. Deploy the Service
  35. {% if swarm_enabled -%}
  36. Deploy to Docker Swarm:
  37. ```bash
  38. docker stack deploy -c compose.yaml komodo
  39. ```
  40. {% else -%}
  41. Start Komodo using Docker Compose:
  42. ```bash
  43. docker compose up -d
  44. ```
  45. {% endif -%}
  46. ### 3. Access the Web Interface
  47. {% if traefik_enabled -%}
  48. * Navigate to: **https://{{ traefik_host }}.{{ traefik_domain }}**
  49. {% else -%}
  50. * Navigate to: **http://localhost:{{ ports_http }}**
  51. {% endif -%}
  52. * Complete initial setup and create admin user
  53. ### 4. Install Periphery Agent
  54. On each server you want to manage:
  55. ```bash
  56. curl -sSL https://raw.githubusercontent.com/moghtech/komodo/main/scripts/setup-periphery.py | python3
  57. ```
  58. ### 5. Configure Servers
  59. * Add servers to Komodo through the web interface
  60. * Configure API keys for programmatic access
  61. * Start managing deployments, stacks, and builds
  62. '
  63. schema: '1.2'
  64. spec:
  65. general:
  66. vars:
  67. service_name:
  68. default: komodo
  69. container_name:
  70. default: komodo
  71. container_hostname:
  72. default: komodo
  73. restart_policy:
  74. type: enum
  75. options:
  76. - unless-stopped
  77. - always
  78. - on-failure
  79. - 'no'
  80. default: unless-stopped
  81. required: true
  82. traefik:
  83. vars:
  84. traefik_enabled:
  85. type: bool
  86. default: false
  87. description: Enable Traefik integration
  88. traefik_entrypoint:
  89. description: The Traefik entrypoint
  90. type: str
  91. required: true
  92. default: web
  93. traefik_host:
  94. default: homepage
  95. traefik_network:
  96. default: traefik
  97. type: str
  98. required: true
  99. traefik_domain:
  100. default: home.arpa
  101. type: str
  102. required: true
  103. traefik_tls:
  104. vars:
  105. traefik_tls_enabled:
  106. description: Enable Traefik TLS
  107. type: bool
  108. default: false
  109. traefik_tls_entrypoint:
  110. description: The Traefik TLS entrypoint
  111. type: str
  112. default: websecure
  113. required: true
  114. traefik_tls_certresolver:
  115. type: str
  116. required: true
  117. default: cloudflare
  118. network:
  119. vars:
  120. network_name:
  121. default: komodo_network
  122. network_macvlan_ipv4_address:
  123. type: str
  124. default: 192.168.1.253
  125. needs:
  126. - network_mode=macvlan
  127. required: true
  128. network_macvlan_parent_interface:
  129. type: str
  130. default: eth0
  131. needs:
  132. - network_mode=macvlan
  133. required: true
  134. network_macvlan_subnet:
  135. type: str
  136. default: 192.168.1.0/24
  137. needs:
  138. - network_mode=macvlan
  139. required: true
  140. network_macvlan_gateway:
  141. type: str
  142. default: 192.168.1.1
  143. needs:
  144. - network_mode=macvlan
  145. required: true
  146. network_external:
  147. type: bool
  148. default: false
  149. description: Whether the network is external
  150. network_mode:
  151. type: str
  152. default: bridge
  153. description: The network mode for the container
  154. ports:
  155. vars:
  156. ports_http:
  157. description: External HTTP port (web interface and API)
  158. type: int
  159. default: 9120
  160. needs:
  161. - traefik_enabled=false
  162. - network_mode=bridge
  163. volume:
  164. vars:
  165. volume_mount_path:
  166. default: /mnt/storage/komodo
  167. volume_nfs_server:
  168. type: str
  169. default: 192.168.1.1
  170. needs:
  171. - volume_mode=nfs
  172. required: true
  173. volume_nfs_path:
  174. type: str
  175. default: /export
  176. needs:
  177. - volume_mode=nfs
  178. required: true
  179. volume_nfs_options:
  180. type: str
  181. default: rw,nolock,soft
  182. needs:
  183. - volume_mode=nfs
  184. required: true
  185. volume_mode:
  186. type: enum
  187. options:
  188. - local
  189. - mount
  190. - nfs
  191. default: local
  192. description: The volume mode
  193. resources:
  194. vars:
  195. resources_enabled:
  196. type: bool
  197. default: false
  198. resources_cpu_limit:
  199. type: str
  200. default: 1.0
  201. required: true
  202. resources_cpu_reservation:
  203. type: str
  204. default: 0.25
  205. needs:
  206. - swarm_enabled=true
  207. required: true
  208. resources_memory_limit:
  209. type: str
  210. default: 1G
  211. required: true
  212. resources_memory_reservation:
  213. type: str
  214. default: 512M
  215. needs:
  216. - swarm_enabled=true
  217. required: true
  218. environment:
  219. title: Environment Variables
  220. toggle: environment_enabled
  221. required: true
  222. vars:
  223. environment_enabled:
  224. type: bool
  225. default: true
  226. description: Configure environment variables (required)
  227. environment_database_address:
  228. type: str
  229. default: mongodb://mongo:27017
  230. description: Database connection address (MongoDB or FerretDB)
  231. needs: environment_enabled=true
  232. environment_database_name:
  233. type: str
  234. default: komodo
  235. description: Database name
  236. needs: environment_enabled=true
  237. environment_database_username:
  238. type: str
  239. default: ''
  240. description: Database username (optional)
  241. needs: environment_enabled=true
  242. environment_database_password:
  243. type: str
  244. default: ''
  245. sensitive: true
  246. description: Database password (optional)
  247. needs: environment_enabled=true
  248. environment_jwt_secret:
  249. type: str
  250. default: ''
  251. sensitive: true
  252. autogenerated: true
  253. description: JWT secret for authentication (auto-generated if empty)
  254. needs: environment_enabled=true
  255. environment_log_level:
  256. type: enum
  257. default: info
  258. options:
  259. - debug
  260. - info
  261. - warn
  262. - error
  263. description: Log level
  264. needs: environment_enabled=true
  265. swarm:
  266. vars:
  267. swarm_enabled:
  268. type: bool
  269. default: false
  270. description: Enable Docker Swarm mode
  271. swarm_placement_host:
  272. type: str
  273. default: ''
  274. description: The placement host
  275. swarm_placement_mode:
  276. type: str
  277. default: replicated
  278. description: The placement mode
  279. swarm_replicas:
  280. type: int
  281. default: 1
  282. description: The number of replicas