-
Notifications
You must be signed in to change notification settings - Fork 572
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (96 loc) · 2.83 KB
/
docker-compose.yml
File metadata and controls
103 lines (96 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: "3.7"
services:
db:
deploy:
# To use an external database, set replicas to 0 and set DATABASE_URL to the external database url in the .env file
replicas: 1
image: postgres:14
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
expose:
- 5432
environment:
POSTGRES_PASSWORD: changeme
POSTGRES_DB: windmill
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
windmill_server:
image: ghcr.io/windmill-labs/windmill:main
pull_policy: always
deploy:
replicas: 1
restart: unless-stopped
expose:
- 8000
ports:
- 3011:8000
environment:
- DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
- RUST_LOG=info
- MODE=server
## You can set the number of workers to 1 and not need any separate worker service but not recommended
- METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001)
depends_on:
db:
condition: service_healthy
windmill_worker:
image: ghcr.io/windmill-labs/windmill:main
pull_policy: always
deploy:
replicas: 3
resources:
limits:
cpus: "1"
memory: 2048M
restart: unless-stopped
environment:
- DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
- RUST_LOG=info
- MODE=worker
- KEEP_JOB_DIR=false
- METRICS_ADDR=false
- WORKER_GROUP=default
depends_on:
db:
condition: service_healthy
# to mount the worker folder to debug, KEEP_JOB_DIR=true and mount /tmp/windmill
volumes:
# mount the docker socket to allow to run docker containers from within the workers
- /var/run/docker.sock:/var/run/docker.sock
- worker_dependency_cache:/tmp/windmill/cache
## This worker is specialized for "native" jobs. Native jobs run in-process and thus are much more lightweight than other jobs
windmill_worker_native:
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
image: ghcr.io/windmill-labs/windmill:main
pull_policy: always
deploy:
replicas: 2
resources:
limits:
cpus: "0.1"
memory: 128M
restart: unless-stopped
environment:
- DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
- RUST_LOG=info
- MODE=worker
- WORKER_GROUP=native
- METRICS_ADDR=false # (ee only, if set to true, metrics will be exposed on port 8001)
depends_on:
db:
condition: service_healthy
lsp:
image: ghcr.io/windmill-labs/windmill-lsp:1.187
restart: unless-stopped
expose:
- 3001
volumes:
- lsp_cache:/root/.cache
volumes:
db_data: null
worker_dependency_cache: null
lsp_cache: null