Skip to content

Commit

Permalink
fix(self-hosting): add lsp and caddy to docke-compose (windmill-labs#432
Browse files Browse the repository at this point in the history
)
  • Loading branch information
lplit authored Aug 16, 2022
1 parent 02d178b commit 1004518
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DB_PASSWORD=changeme
WM_BASE_URL=windmill.localhost
5 changes: 5 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{$BASE_URL} {
bind {$ADDRESS}
reverse_proxy /ws/* http://lsp:3001
reverse_proxy /* http://windmill:8000
}
25 changes: 19 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ services:

db:
image: postgres:14
restart: always
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
# - ./init-db.sql:/docker-entrypoint-initdb.d/create_tables.sql
ports:
- 5432:5432
environment:
Expand All @@ -23,10 +22,10 @@ services:
privileged: true
restart: unless-stopped
ports:
- 80:8000
- 8000:8000
environment:
- DATABASE_URL=postgres://postgres:${DB_PASSWORD}@db/windmill?sslmode=disable
- BASE_URL=http://localhost
- BASE_URL=http://${WM_BASE_URL}}
- BASE_INTERNAL_URL=http://localhost:8000
- RUST_LOG=info
- NUM_WORKERS=3
Expand All @@ -35,10 +34,24 @@ services:
- DENO_PATH=/usr/bin/deno
- PYTHON_PATH=/usr/local/bin/python3
- NSJAIL_PATH=nsjail

depends_on:
db:
condition: service_healthy
volumes:
lsp:
image: ghcr.io/windmill-labs/windmill-lsp:latest
restart: unless-stopped
ports:
- 3001:3001
caddy:
image: caddy:2.5.2-alpine
restart: unless-stopped
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
ports:
- 80:80
- 443:443
environment:
- BASE_URL=${WM_BASE_URL}

volumes:
db_data: null

0 comments on commit 1004518

Please sign in to comment.