変更内容
削除したもの traefik-net 外部ネットワーク windmill_server の全 Traefik ラベル windmill_extra の全 Traefik ラベル サーバー固有のボリューム /home/windmill/windmill:/workspace(ローカルには不要) Google OAuth 環境変数(ローカル開発では不要) windmill_indexer(replicas: 0 で無意味だったので削除) 追加・変更したもの 項目 変更前 変更後 ネットワーク traefik-net + windmill-internal windmill-internal のみ アクセス方法 Traefik経由(HTTPS) Caddy経由 http://localhost POSTGRES_PASSWORD ${POSTGRES_PASSWORD} ${DATABASE_PASSWORD}(.envと統一) windmill_worker replicas 3 1(ローカル用に軽量化) pull_policy always if_not_present(毎回pullしない) BASE_URL https://windmill.keinafarm.net http://localhost 新規作成 Caddyfile.local — ローカル用のシンプルなCaddy設定(LSP WebSocket・デバッガー対応) 起動方法 docker compose -f docker-compose-dev.yml up -d 起動後、ブラウザで http://localhost にアクセスすればWindmillが使えます。 注意: windmill_worker に /var/run/docker.sock をマウントしていますが、Windows の Docker Desktop は通常これをサポートしています。もし問題が出る場合はそのボリューム行を削除してください。
This commit is contained in:
12
Caddyfile.local
Normal file
12
Caddyfile.local
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
:80 {
|
||||||
|
# LSP - Language Server Protocol for code intelligence
|
||||||
|
reverse_proxy /ws/* http://windmill_extra:3001
|
||||||
|
|
||||||
|
# Debugger - Interactive debugging via DAP WebSocket
|
||||||
|
handle_path /ws_debug/* {
|
||||||
|
reverse_proxy http://windmill_extra:3003
|
||||||
|
}
|
||||||
|
|
||||||
|
# Default: Windmill server
|
||||||
|
reverse_proxy /* http://windmill_server:8000
|
||||||
|
}
|
||||||
@@ -8,10 +8,8 @@ x-logging: &default-logging
|
|||||||
compress: "true"
|
compress: "true"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
traefik-net:
|
|
||||||
external: true # Traefik管理下のネットワーク
|
|
||||||
windmill-internal:
|
windmill-internal:
|
||||||
driver: bridge # Windmill内部通信用
|
driver: bridge
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
@@ -25,7 +23,7 @@ services:
|
|||||||
expose:
|
expose:
|
||||||
- 5432
|
- 5432
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
|
||||||
POSTGRES_DB: windmill
|
POSTGRES_DB: windmill
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
||||||
@@ -39,46 +37,30 @@ services:
|
|||||||
windmill_server:
|
windmill_server:
|
||||||
image: ${WM_IMAGE}
|
image: ${WM_IMAGE}
|
||||||
container_name: windmill_server
|
container_name: windmill_server
|
||||||
pull_policy: always
|
pull_policy: if_not_present
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- 8000
|
- 8000
|
||||||
- 2525
|
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=${DATABASE_URL}
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
- MODE=server
|
- MODE=server
|
||||||
|
- BASE_URL=http://localhost
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
- worker_logs:/tmp/windmill/logs
|
- worker_logs:/tmp/windmill/logs
|
||||||
- /home/windmill/windmill:/workspace
|
|
||||||
labels:
|
|
||||||
# Traefik設定
|
|
||||||
- "traefik.enable=true"
|
|
||||||
# HTTPSルーター
|
|
||||||
- "traefik.http.routers.windmill.rule=Host(`windmill.keinafarm.net`)"
|
|
||||||
- "traefik.http.routers.windmill.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.windmill.tls=true"
|
|
||||||
- "traefik.http.routers.windmill.tls.certresolver=letsencrypt"
|
|
||||||
- "traefik.http.services.windmill.loadbalancer.server.port=8000"
|
|
||||||
# HTTPからHTTPSへのリダイレクト
|
|
||||||
- "traefik.http.routers.windmill-http.rule=Host(`windmill.keinafarm.net`)"
|
|
||||||
- "traefik.http.routers.windmill-http.entrypoints=web"
|
|
||||||
- "traefik.http.routers.windmill-http.middlewares=windmill-https-redirect"
|
|
||||||
- "traefik.http.middlewares.windmill-https-redirect.redirectscheme.scheme=https"
|
|
||||||
networks:
|
networks:
|
||||||
- traefik-net
|
|
||||||
- windmill-internal
|
- windmill-internal
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
||||||
windmill_worker:
|
windmill_worker:
|
||||||
image: ${WM_IMAGE}
|
image: ${WM_IMAGE}
|
||||||
pull_policy: always
|
pull_policy: if_not_present
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 3
|
replicas: 1
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: "1"
|
cpus: "1"
|
||||||
@@ -95,14 +77,13 @@ services:
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- worker_dependency_cache:/tmp/windmill/cache
|
- worker_dependency_cache:/tmp/windmill/cache
|
||||||
- worker_logs:/tmp/windmill/logs
|
- worker_logs:/tmp/windmill/logs
|
||||||
- /home/windmill/windmill:/workspace
|
|
||||||
networks:
|
networks:
|
||||||
- windmill-internal
|
- windmill-internal
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
||||||
windmill_worker_native:
|
windmill_worker_native:
|
||||||
image: ${WM_IMAGE}
|
image: ${WM_IMAGE}
|
||||||
pull_policy: always
|
pull_policy: if_not_present
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
resources:
|
resources:
|
||||||
@@ -125,35 +106,12 @@ services:
|
|||||||
- windmill-internal
|
- windmill-internal
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
|
|
||||||
windmill_indexer:
|
|
||||||
image: ${WM_IMAGE}
|
|
||||||
pull_policy: always
|
|
||||||
deploy:
|
|
||||||
replicas: 0 # 必要に応じて1に変更
|
|
||||||
restart: unless-stopped
|
|
||||||
expose:
|
|
||||||
- 8002
|
|
||||||
environment:
|
|
||||||
- PORT=8002
|
|
||||||
- DATABASE_URL=${DATABASE_URL}
|
|
||||||
- MODE=indexer
|
|
||||||
depends_on:
|
|
||||||
db:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
|
||||||
- windmill_index:/tmp/windmill/search
|
|
||||||
- worker_logs:/tmp/windmill/logs
|
|
||||||
networks:
|
|
||||||
- windmill-internal
|
|
||||||
logging: *default-logging
|
|
||||||
|
|
||||||
windmill_extra:
|
windmill_extra:
|
||||||
image: ghcr.io/windmill-labs/windmill-extra:latest
|
image: ghcr.io/windmill-labs/windmill-extra:${WM_VERSION}
|
||||||
pull_policy: always
|
pull_policy: if_not_present
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- 3001
|
- 3001
|
||||||
- 3002
|
|
||||||
- 3003
|
- 3003
|
||||||
environment:
|
environment:
|
||||||
- ENABLE_LSP=true
|
- ENABLE_LSP=true
|
||||||
@@ -168,15 +126,27 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- windmill-internal
|
- windmill-internal
|
||||||
logging: *default-logging
|
logging: *default-logging
|
||||||
# Caddyは使わない(Traefikを使用)
|
|
||||||
# caddy:
|
caddy:
|
||||||
# deploy:
|
image: caddy:2.9-alpine
|
||||||
# replicas: 0
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./Caddyfile.local:/etc/caddy/Caddyfile
|
||||||
|
- caddy_data:/data
|
||||||
|
- caddy_config:/config
|
||||||
|
networks:
|
||||||
|
- windmill-internal
|
||||||
|
logging: *default-logging
|
||||||
|
depends_on:
|
||||||
|
- windmill_server
|
||||||
|
- windmill_extra
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db_data: null
|
db_data: null
|
||||||
worker_dependency_cache: null
|
worker_dependency_cache: null
|
||||||
worker_logs: null
|
worker_logs: null
|
||||||
worker_memory: null
|
|
||||||
windmill_index: null
|
|
||||||
lsp_cache: null
|
lsp_cache: null
|
||||||
|
caddy_data: null
|
||||||
|
caddy_config: null
|
||||||
|
|||||||
@@ -50,8 +50,10 @@ if [[ -n $(git status --porcelain) ]]; then
|
|||||||
git commit -m "Auto-sync: ${TIMESTAMP}"
|
git commit -m "Auto-sync: ${TIMESTAMP}"
|
||||||
|
|
||||||
echo -e "${YELLOW}Pushing to Gitea...${NC}"
|
echo -e "${YELLOW}Pushing to Gitea...${NC}"
|
||||||
# リモートURLにトークンが含まれていない場合、プッシュに失敗する可能性がある
|
# リモートの変更を先に取り込む(ローカルPCからのpushがある場合に備えて)
|
||||||
# ここでは既存のoriginを使用
|
git pull --rebase origin main || {
|
||||||
|
echo -e "${RED}Failed to pull from remote. Trying push anyway...${NC}"
|
||||||
|
}
|
||||||
git push origin main || {
|
git push origin main || {
|
||||||
echo -e "${RED}Failed to push. Need credentials in git remote url or credential helper.${NC}"
|
echo -e "${RED}Failed to push. Need credentials in git remote url or credential helper.${NC}"
|
||||||
echo -e "${YELLOW}Hint: git remote set-url origin https://<token>@gitea.keinafarm.net/...${NC}"
|
echo -e "${YELLOW}Hint: git remote set-url origin https://<token>@gitea.keinafarm.net/...${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user