compose.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. # NETWORK
  2. networks:
  3. backend:
  4. # Network for connection between the windmill services & the db
  5. name: backend
  6. driver: bridge
  7. internal: true
  8. frontend:
  9. # Network for the windmill-server to be reached from the outside
  10. name: frontend
  11. driver: bridge
  12. # SERVICES
  13. services:
  14. # TAILSCALE VPN
  15. tailscale:
  16. container_name: Tailscale
  17. image: tailscale/tailscale:latest
  18. restart: always
  19. volumes:
  20. - ./tun:/dev/net/tun
  21. - ./lib:/var/lib
  22. environment:
  23. - TS_STATE_DIR=/var/lib/tailscale
  24. - TS_ROUTES=192.168.2.0/24
  25. - TS_HOSTNAME=Smallmountains
  26. - PUID=1002
  27. - PGID=100
  28. network_mode: host
  29. privileged: true
  30. # POSTGRES FOR WINDMILL
  31. postgres:
  32. container_name: Postgres
  33. image: postgres:16
  34. restart: always
  35. shm_size: 1g
  36. networks:
  37. - backend
  38. volumes:
  39. - ./postgres:/var/lib/postgresql/data
  40. expose:
  41. - 5432
  42. environment:
  43. - PUID=1002
  44. - PGID=100
  45. - POSTGRES_PASSWORD=changeme
  46. - POSTGRES_DB=windmill
  47. healthcheck:
  48. test: ["CMD-SHELL", "pg_isready -U postgres"]
  49. interval: 10s
  50. timeout: 5s
  51. retries: 5
  52. # WINDMILL SERVER
  53. windmill_server:
  54. container_name: Windmill_Server
  55. image: ghcr.io/windmill-labs/windmill:main
  56. restart: always
  57. pull_policy: always
  58. networks:
  59. - backend
  60. - frontend
  61. expose:
  62. - 8000
  63. - 2525
  64. environment:
  65. - PUID=1002
  66. - PGID=100
  67. - DATABASE_URL=postgres://postgres:changeme@postgres/windmill?sslmode=disable
  68. - MODE=server
  69. depends_on:
  70. postgres:
  71. condition: service_healthy
  72. volumes:
  73. - ./windmill_worker_logs:/tmp/windmill/logs
  74. # WINDMILL WORKER
  75. windmill_worker:
  76. container_name: Windmill_Worker
  77. image: ghcr.io/windmill-labs/windmill:main
  78. restart: always
  79. pull_policy: always
  80. networks:
  81. - backend
  82. deploy:
  83. replicas: 1
  84. resources:
  85. limits:
  86. cpus: "1"
  87. memory: 2048M # for GB, use syntax '2Gi'
  88. environment:
  89. - PUID=1002
  90. - PGID=100
  91. - DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill?sslmode=disable
  92. - MODE=worker
  93. - WORKER_GROUP=default
  94. depends_on:
  95. postgres:
  96. condition: service_healthy
  97. volumes:
  98. # mount the docker socket to allow to run docker containers from within the workers
  99. - /var/run/docker.sock:/var/run/docker.sock
  100. - ./windmill_worker_dependency_cache:/tmp/windmill/cache
  101. - ./windmill_worker_logs:/tmp/windmill/logs
  102. # WINDMILL so-called NATIVE WORKER
  103. windmill_worker_native:
  104. container_name: Windmill_Native_Worker
  105. image: ghcr.io/windmill-labs/windmill:main
  106. restart: always
  107. pull_policy: always
  108. networks:
  109. - backend
  110. deploy:
  111. replicas: 1
  112. resources:
  113. limits:
  114. cpus: "1"
  115. memory: 2048M
  116. # for GB, use syntax '2Gi'
  117. environment:
  118. - PUID=1002
  119. - PGID=100
  120. - DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill?sslmode=disable
  121. - MODE=worker
  122. - WORKER_GROUP=native
  123. - NUM_WORKERS=8
  124. - SLEEP_QUEUE=200
  125. depends_on:
  126. postgres:
  127. condition: service_healthy
  128. volumes:
  129. - ./windmill_worker_logs:/tmp/windmill/logs
  130. # WINDMILL IDE INTELLISENSE SUPPORT
  131. Windmill_lsp:
  132. container_name: Windmill_LSP
  133. image: ghcr.io/windmill-labs/windmill-lsp:latest
  134. restart: always
  135. pull_policy: always
  136. networks:
  137. - backend
  138. environment:
  139. - PUID=1002
  140. - PGID=100
  141. expose:
  142. - 3001
  143. volumes:
  144. - ./windmill_lsp_cache:/pyls/.cache