docker.recipes

Windmill Script Platform

intermediate

Open-source developer platform for scripts, workflows, and UIs.

Overview

Windmill is an open-source developer platform designed to transform scripts into production-grade workflows, UIs, and internal tools. Created to bridge the gap between quick automation scripts and enterprise-grade applications, Windmill allows developers to write code in Python, TypeScript, Go, or Bash and automatically generate web interfaces, APIs, and scheduled workflows. The platform emphasizes developer experience with features like auto-generated UIs, dependency management, and built-in observability. This deployment creates a complete Windmill environment with four specialized services: the main Windmill server handling the web interface and API, three worker instances for parallel script execution, a Language Server Protocol (LSP) service for enhanced code editing with autocompletion and error checking, and a PostgreSQL database for persistent storage of scripts, workflows, and execution history. The architecture separates concerns effectively, allowing the web interface to remain responsive while workers handle compute-intensive tasks. This configuration is ideal for development teams wanting to standardize their internal tooling, DevOps engineers looking to create self-service automation portals, and organizations needing to transform ad-hoc scripts into reliable, auditable workflows. The multi-worker setup ensures good performance for concurrent script executions while the integrated LSP provides a superior development experience directly in the browser.

Key Features

  • Multi-language script support with Python, TypeScript, Go, and Bash runtime environments
  • Auto-generated web UIs from script parameters with form validation and custom input types
  • Horizontal scaling with three dedicated worker instances for parallel script execution
  • Integrated Language Server Protocol support for real-time code completion and error detection
  • Built-in dependency management handling npm, pip, and Go module installations automatically
  • Workflow orchestration with conditional logic, loops, and error handling capabilities
  • Role-based access control with granular permissions for scripts and workflows
  • Execution history and audit logs stored in PostgreSQL with detailed runtime metrics

Common Use Cases

  • 1Internal tool development for customer support teams needing custom data queries and operations
  • 2DevOps automation workflows for deployment pipelines, infrastructure provisioning, and monitoring
  • 3Data engineering tasks including ETL processes, data validation, and automated reporting
  • 4IT operations self-service portals for user management, server provisioning, and maintenance tasks
  • 5Business process automation for invoice processing, data migrations, and compliance checks
  • 6API integration workflows connecting multiple services with custom business logic
  • 7Scheduled maintenance scripts converted into monitored, logged, and alerting-enabled workflows

Prerequisites

  • Docker Engine 20.10+ with Docker Compose V2 support for service health checks
  • Minimum 2GB RAM available (1GB for PostgreSQL, 512MB for Windmill server, 256MB per worker)
  • Port 8000 available on host system for accessing the Windmill web interface
  • Basic understanding of scripting in Python, TypeScript, Go, or Bash for creating workflows
  • Familiarity with environment variable configuration for database credentials
  • Network connectivity for downloading language dependencies during script execution

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 windmill:
3 image: ghcr.io/windmill-labs/windmill:main
4 ports:
5 - "8000:8000"
6 environment:
7 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
8 MODE: server
9 depends_on:
10 postgres:
11 condition: service_healthy
12 networks:
13 - windmill-net
14 restart: unless-stopped
15
16 windmill-worker:
17 image: ghcr.io/windmill-labs/windmill:main
18 environment:
19 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
20 MODE: worker
21 WORKER_GROUP: default
22 depends_on:
23 - windmill
24 networks:
25 - windmill-net
26 restart: unless-stopped
27 deploy:
28 replicas: 3
29
30 windmill-lsp:
31 image: ghcr.io/windmill-labs/windmill-lsp:latest
32 networks:
33 - windmill-net
34 restart: unless-stopped
35
36 postgres:
37 image: postgres:16-alpine
38 environment:
39 POSTGRES_USER: ${POSTGRES_USER}
40 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
41 POSTGRES_DB: ${POSTGRES_DB}
42 volumes:
43 - postgres_data:/var/lib/postgresql/data
44 healthcheck:
45 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
46 interval: 10s
47 timeout: 5s
48 retries: 5
49 networks:
50 - windmill-net
51 restart: unless-stopped
52
53volumes:
54 postgres_data:
55
56networks:
57 windmill-net:
58 driver: bridge

.env Template

.env
1# PostgreSQL
2POSTGRES_USER=windmill
3POSTGRES_PASSWORD=secure_postgres_password
4POSTGRES_DB=windmill

Usage Notes

  1. 1Windmill at http://localhost:8000
  2. 2Default login: admin@windmill.dev / changeme
  3. 3Write scripts in Python, TypeScript, Go, Bash
  4. 4LSP for code completion in editor

Individual Services(4 services)

Copy individual services to mix and match with your existing compose files.

windmill
windmill:
  image: ghcr.io/windmill-labs/windmill:main
  ports:
    - "8000:8000"
  environment:
    DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
    MODE: server
  depends_on:
    postgres:
      condition: service_healthy
  networks:
    - windmill-net
  restart: unless-stopped
windmill-worker
windmill-worker:
  image: ghcr.io/windmill-labs/windmill:main
  environment:
    DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
    MODE: worker
    WORKER_GROUP: default
  depends_on:
    - windmill
  networks:
    - windmill-net
  restart: unless-stopped
  deploy:
    replicas: 3
windmill-lsp
windmill-lsp:
  image: ghcr.io/windmill-labs/windmill-lsp:latest
  networks:
    - windmill-net
  restart: unless-stopped
postgres
postgres:
  image: postgres:16-alpine
  environment:
    POSTGRES_USER: ${POSTGRES_USER}
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: ${POSTGRES_DB}
  volumes:
    - postgres_data:/var/lib/postgresql/data
  healthcheck:
    test:
      - CMD-SHELL
      - pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}
    interval: 10s
    timeout: 5s
    retries: 5
  networks:
    - windmill-net
  restart: unless-stopped

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 windmill:
5 image: ghcr.io/windmill-labs/windmill:main
6 ports:
7 - "8000:8000"
8 environment:
9 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
10 MODE: server
11 depends_on:
12 postgres:
13 condition: service_healthy
14 networks:
15 - windmill-net
16 restart: unless-stopped
17
18 windmill-worker:
19 image: ghcr.io/windmill-labs/windmill:main
20 environment:
21 DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
22 MODE: worker
23 WORKER_GROUP: default
24 depends_on:
25 - windmill
26 networks:
27 - windmill-net
28 restart: unless-stopped
29 deploy:
30 replicas: 3
31
32 windmill-lsp:
33 image: ghcr.io/windmill-labs/windmill-lsp:latest
34 networks:
35 - windmill-net
36 restart: unless-stopped
37
38 postgres:
39 image: postgres:16-alpine
40 environment:
41 POSTGRES_USER: ${POSTGRES_USER}
42 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
43 POSTGRES_DB: ${POSTGRES_DB}
44 volumes:
45 - postgres_data:/var/lib/postgresql/data
46 healthcheck:
47 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
48 interval: 10s
49 timeout: 5s
50 retries: 5
51 networks:
52 - windmill-net
53 restart: unless-stopped
54
55volumes:
56 postgres_data:
57
58networks:
59 windmill-net:
60 driver: bridge
61EOF
62
63# 2. Create the .env file
64cat > .env << 'EOF'
65# PostgreSQL
66POSTGRES_USER=windmill
67POSTGRES_PASSWORD=secure_postgres_password
68POSTGRES_DB=windmill
69EOF
70
71# 3. Start the services
72docker compose up -d
73
74# 4. View logs
75docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/windmill-scripting/run | bash

Troubleshooting

  • Windmill web interface shows 'Database connection failed': Verify POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB environment variables match between windmill and postgres services
  • Scripts fail with 'Worker not available' errors: Check windmill-worker container logs and ensure workers have successfully connected to the main windmill service
  • Code completion not working in script editor: Verify windmill-lsp container is running and check browser network tab for WebSocket connection errors to LSP service
  • PostgreSQL container fails to start with permission errors: Ensure postgres_data volume has correct ownership and the postgres user can write to the mounted directory
  • Script execution timeouts or memory errors: Increase worker container memory limits or reduce the number of concurrent executions in worker configuration
  • Cannot access Windmill at localhost:8000: Confirm port 8000 is not in use by another service and check windmill container logs for binding errors

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space