| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- # NETWORK
- networks:
- backend:
- # Network for connection between the windmill services & the db
- name: backend
- driver: bridge
- internal: true
- frontend:
- # Network for the windmill-server to be reached from the outside
- name: frontend
- driver: bridge
- # SERVICES
- services:
- # TAILSCALE VPN
- tailscale:
- container_name: Tailscale
- image: tailscale/tailscale:latest
- restart: always
- volumes:
- - ./tun:/dev/net/tun
- - ./lib:/var/lib
- environment:
- - TS_STATE_DIR=/var/lib/tailscale
- - TS_ROUTES=192.168.2.0/24
- - TS_HOSTNAME=Smallmountains
- - PUID=1002
- - PGID=100
- network_mode: host
- privileged: true
- # POSTGRES FOR WINDMILL
- postgres:
- container_name: Postgres
- image: postgres:16
- restart: always
- shm_size: 1g
- networks:
- - backend
- volumes:
- - ./postgres:/var/lib/postgresql/data
- expose:
- - 5432
- environment:
- - PUID=1002
- - PGID=100
- - POSTGRES_PASSWORD=changeme
- - POSTGRES_DB=windmill
- healthcheck:
- test: ["CMD-SHELL", "pg_isready -U postgres"]
- interval: 10s
- timeout: 5s
- retries: 5
- # WINDMILL SERVER
- windmill_server:
- container_name: Windmill_Server
- image: ghcr.io/windmill-labs/windmill:main
- restart: always
- pull_policy: always
- networks:
- - backend
- - frontend
- expose:
- - 8000
- - 2525
- environment:
- - PUID=1002
- - PGID=100
- - DATABASE_URL=postgres://postgres:changeme@postgres/windmill?sslmode=disable
- - MODE=server
- depends_on:
- postgres:
- condition: service_healthy
- volumes:
- - ./windmill_worker_logs:/tmp/windmill/logs
- # WINDMILL WORKER
- windmill_worker:
- container_name: Windmill_Worker
- image: ghcr.io/windmill-labs/windmill:main
- restart: always
- pull_policy: always
- networks:
- - backend
- deploy:
- replicas: 1
- resources:
- limits:
- cpus: "1"
- memory: 2048M # for GB, use syntax '2Gi'
- environment:
- - PUID=1002
- - PGID=100
- - DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill?sslmode=disable
- - MODE=worker
- - WORKER_GROUP=default
- depends_on:
- postgres:
- condition: service_healthy
- volumes:
- # mount the docker socket to allow to run docker containers from within the workers
- - /var/run/docker.sock:/var/run/docker.sock
- - ./windmill_worker_dependency_cache:/tmp/windmill/cache
- - ./windmill_worker_logs:/tmp/windmill/logs
- # WINDMILL so-called NATIVE WORKER
- windmill_worker_native:
- container_name: Windmill_Native_Worker
- image: ghcr.io/windmill-labs/windmill:main
- restart: always
- pull_policy: always
- networks:
- - backend
- deploy:
- replicas: 1
- resources:
- limits:
- cpus: "1"
- memory: 2048M
- # for GB, use syntax '2Gi'
- environment:
- - PUID=1002
- - PGID=100
- - DATABASE_URL=postgres://postgres:changeme@postgres:5432/windmill?sslmode=disable
- - MODE=worker
- - WORKER_GROUP=native
- - NUM_WORKERS=8
- - SLEEP_QUEUE=200
- depends_on:
- postgres:
- condition: service_healthy
- volumes:
- - ./windmill_worker_logs:/tmp/windmill/logs
- # WINDMILL IDE INTELLISENSE SUPPORT
- Windmill_lsp:
- container_name: Windmill_LSP
- image: ghcr.io/windmill-labs/windmill-lsp:latest
- restart: always
- pull_policy: always
- networks:
- - backend
- environment:
- - PUID=1002
- - PGID=100
- expose:
- - 3001
- volumes:
- - ./windmill_lsp_cache:/pyls/.cache
|