mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
improve docker-compose
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
DB_PASSWORD=changeme
|
||||
DATABASE_URL=postgres://postgres:changeme@db/windmill?sslmode=disable
|
||||
|
||||
WML_IMAGE=ghcr.io/windmill-labs/windmill:main
|
||||
WM_LICENSE_KEY=""
|
||||
|
||||
# For Enterprise Edition, comment the 2 lines above and uncomment below
|
||||
# WINDMILL_IMAGE=ghcr.io/windmill-labs/windmill-ee:main
|
||||
# WM_LICENSE_KEY="<id>.<expiry>.<signature>"
|
||||
|
||||
|
||||
# this is the url that your instance is publicly exposed to
|
||||
WM_BASE_URL=http://localhost
|
||||
|
||||
# To use another port than :80, setup the Caddyfile and the caddy section of the docker-compose to your needs: https://caddyserver.com/docs/getting-started
|
||||
# To have caddy take care of automatic TLS
|
||||
|
||||
# License key for enterprise edition
|
||||
# WM_LICENSE_KEY="<id>.<expiry>.<signature>"
|
||||
|
||||
WM_REQUEST_SIZE_LIMIT=50097152 # 50MB (The size limit for any requests, including script/flow args inputs)
|
||||
|
||||
+1
-1
@@ -299,7 +299,7 @@ pub async fn run_workers<R: rsmq_async::RsmqConnection + Send + Sync + Clone + '
|
||||
ee::verify_license_key(LICENSE_KEY.clone())?;
|
||||
|
||||
#[cfg(not(feature = "enterprise"))]
|
||||
if LICENSE_KEY.is_some() {
|
||||
if LICENSE_KEY.as_ref().is_some_and(|x| !x.is_empty()) {
|
||||
panic!("License key is required ONLY for the enterprise edition");
|
||||
}
|
||||
|
||||
|
||||
+32
-25
@@ -2,6 +2,9 @@ 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:
|
||||
@@ -19,7 +22,7 @@ services:
|
||||
|
||||
windmill_server:
|
||||
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
|
||||
image: ghcr.io/windmill-labs/windmill:main
|
||||
image: ${WM_IMAGE}
|
||||
pull_policy: always
|
||||
deploy:
|
||||
replicas: 1
|
||||
@@ -27,32 +30,32 @@ services:
|
||||
expose:
|
||||
- 8000
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- BASE_URL=${WM_BASE_URL}
|
||||
- RUST_LOG=info
|
||||
## You can set the number of workers to > 0 and not need any separate worker service but not recommended
|
||||
- NUM_WORKERS=0
|
||||
- DISABLE_SERVER=false
|
||||
- METRICS_ADDR=false
|
||||
- REQUEST_SIZE_LIMIT=2097152 # 2MB (The size limit for any requests, including script/flow args inputs)
|
||||
- REQUEST_SIZE_LIMIT=${WM_REQUEST_SIZE_LIMIT}
|
||||
# LICENSE_KEY is only needed for the enterprise edition
|
||||
# - LICENSE_KEY=${WM_LICENSE_KEY}
|
||||
- LICENSE_KEY=${WM_LICENSE_KEY}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
# volumes:
|
||||
# uncomment if using OAuth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
# - ./oauth.json/:/usr/src/app/oauth.json
|
||||
volumes:
|
||||
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
- ./oauth.json:/usr/src/app/oauth.json
|
||||
|
||||
windmill_worker:
|
||||
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
|
||||
image: ghcr.io/windmill-labs/windmill:main
|
||||
image: ${WM_IMAGE}
|
||||
pull_policy: always
|
||||
deploy:
|
||||
replicas: 3
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- BASE_URL=${WM_BASE_URL}
|
||||
- RUST_LOG=info
|
||||
- DISABLE_SERVER=true
|
||||
@@ -61,27 +64,27 @@ services:
|
||||
# To handle all tags, remove the env variable altogether. If you do so, you can remove the windmill_worker_native containers.
|
||||
- WORKER_TAGS=deno,python3,go,bash,dependency,flow,hub,other,bun
|
||||
# LICENSE_KEY is only needed for the enterprise edition
|
||||
# - LICENSE_KEY=${WM_LICENSE_KEY}
|
||||
- LICENSE_KEY=${WM_LICENSE_KEY}
|
||||
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
|
||||
# uncomment if using OAuth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
# - ./oauth.json/:/usr/src/app/oauth.json
|
||||
# mount the docker socket to allow to run docker containers from within the workers
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
- ./oauth.json:/usr/src/app/oauth.json
|
||||
|
||||
## This worker is specialized for "native" jobs. Jobs that are lightweight and run "in-process" and can thus be parallelized to more than 1 at a time on a given worker
|
||||
windmill_worker_native:
|
||||
# Use ghcr.io/windmill-labs/windmill-ee:main for the ee
|
||||
image: ghcr.io/windmill-labs/windmill:main
|
||||
image: ${WM_IMAGE}
|
||||
pull_policy: always
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
|
||||
- DATABASE_URL=${DATABASE_URL}
|
||||
- BASE_URL=${WM_BASE_URL}
|
||||
- RUST_LOG=info
|
||||
- DISABLE_SERVER=true
|
||||
@@ -94,9 +97,9 @@ services:
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
# volumes:
|
||||
# uncomment if using OAuth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
# - ./oauth.json/:/usr/src/app/oauth.json
|
||||
volumes:
|
||||
# See Oauth (https://docs.windmill.dev/docs/misc/setup_oauth)
|
||||
- ./oauth.json:/usr/src/app/oauth.json
|
||||
|
||||
|
||||
lsp:
|
||||
@@ -106,12 +109,14 @@ services:
|
||||
- 3001
|
||||
volumes:
|
||||
- lsp_cache:/root/.cache
|
||||
# Uncomment to enable multiplayer on the enterprise edition
|
||||
# multiplayer:
|
||||
# image: ghcr.io/windmill-labs/windmill-multiplayer:latest
|
||||
# restart: unless-stopped
|
||||
# expose:
|
||||
# - 3002
|
||||
|
||||
multiplayer:
|
||||
image: ghcr.io/windmill-labs/windmill-multiplayer:latest
|
||||
deploy:
|
||||
replicas: 0 # Set to 1 to enable multiplayer, only available on Enterprise Edition
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- 3002
|
||||
|
||||
caddy:
|
||||
image: caddy:2.5.2-alpine
|
||||
@@ -123,8 +128,10 @@ services:
|
||||
ports:
|
||||
# To change the exposed port, simply change 80:80 to <desired_port>:80. No other changes needed
|
||||
- 80:80
|
||||
#- 443:443 # Uncomment to enable HTTPS handling by Caddy
|
||||
environment:
|
||||
- BASE_URL=":80"
|
||||
#- BASE_URL=mydomain.com # Uncomment and comment line above to enable HTTPS handling by Caddy
|
||||
|
||||
volumes:
|
||||
db_data: null
|
||||
|
||||
Reference in New Issue
Block a user