From be710b920e960f552c66e8a5ffd0bc612137c7f7 Mon Sep 17 00:00:00 2001 From: Akira Date: Sun, 22 Feb 2026 10:37:12 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=86=85=E5=AE=B9=20?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=97=E3=81=9F=E3=82=82=E3=81=AE=20traefi?= =?UTF-8?q?k-net=20=E5=A4=96=E9=83=A8=E3=83=8D=E3=83=83=E3=83=88=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=82=AF=20windmill=5Fserver=20=E3=81=AE=E5=85=A8=20T?= =?UTF-8?q?raefik=20=E3=83=A9=E3=83=99=E3=83=AB=20windmill=5Fextra=20?= =?UTF-8?q?=E3=81=AE=E5=85=A8=20Traefik=20=E3=83=A9=E3=83=99=E3=83=AB=20?= =?UTF-8?q?=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E5=9B=BA=E6=9C=89=E3=81=AE?= =?UTF-8?q?=E3=83=9C=E3=83=AA=E3=83=A5=E3=83=BC=E3=83=A0=20/home/windmill/?= =?UTF-8?q?windmill:/workspace=EF=BC=88=E3=83=AD=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=AB=E3=81=AB=E3=81=AF=E4=B8=8D=E8=A6=81=EF=BC=89=20Google?= =?UTF-8?q?=20OAuth=20=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=EF=BC=88?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E9=96=8B=E7=99=BA=E3=81=A7?= =?UTF-8?q?=E3=81=AF=E4=B8=8D=E8=A6=81=EF=BC=89=20windmill=5Findexer?= =?UTF-8?q?=EF=BC=88replicas:=200=20=E3=81=A7=E7=84=A1=E6=84=8F=E5=91=B3?= =?UTF-8?q?=E3=81=A0=E3=81=A3=E3=81=9F=E3=81=AE=E3=81=A7=E5=89=8A=E9=99=A4?= =?UTF-8?q?=EF=BC=89=20=E8=BF=BD=E5=8A=A0=E3=83=BB=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=82=82=E3=81=AE=20=E9=A0=85=E7=9B=AE=09?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E5=89=8D=09=E5=A4=89=E6=9B=B4=E5=BE=8C=20?= =?UTF-8?q?=E3=83=8D=E3=83=83=E3=83=88=E3=83=AF=E3=83=BC=E3=82=AF=09traefi?= =?UTF-8?q?k-net=20+=20windmill-internal=09windmill-internal=20=E3=81=AE?= =?UTF-8?q?=E3=81=BF=20=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E6=96=B9?= =?UTF-8?q?=E6=B3=95=09Traefik=E7=B5=8C=E7=94=B1=EF=BC=88HTTPS=EF=BC=89=09?= =?UTF-8?q?Caddy=E7=B5=8C=E7=94=B1=20http://localhost=20POSTGRES=5FPASSWOR?= =?UTF-8?q?D=09${POSTGRES=5FPASSWORD}=09${DATABASE=5FPASSWORD}=EF=BC=88.en?= =?UTF-8?q?v=E3=81=A8=E7=B5=B1=E4=B8=80=EF=BC=89=20windmill=5Fworker=20rep?= =?UTF-8?q?licas=093=091=EF=BC=88=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E7=94=A8=E3=81=AB=E8=BB=BD=E9=87=8F=E5=8C=96=EF=BC=89=20pull?= =?UTF-8?q?=5Fpolicy=09always=09if=5Fnot=5Fpresent=EF=BC=88=E6=AF=8E?= =?UTF-8?q?=E5=9B=9Epull=E3=81=97=E3=81=AA=E3=81=84=EF=BC=89=20BASE=5FURL?= =?UTF-8?q?=09https://windmill.keinafarm.net=09http://localhost=20?= =?UTF-8?q?=E6=96=B0=E8=A6=8F=E4=BD=9C=E6=88=90=20Caddyfile.local=20?= =?UTF-8?q?=E2=80=94=20=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB=E7=94=A8?= =?UTF-8?q?=E3=81=AE=E3=82=B7=E3=83=B3=E3=83=97=E3=83=AB=E3=81=AACaddy?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=EF=BC=88LSP=20WebSocket=E3=83=BB=E3=83=87?= =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=AC=E3=83=BC=E5=AF=BE=E5=BF=9C=EF=BC=89?= =?UTF-8?q?=20=E8=B5=B7=E5=8B=95=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit docker compose -f docker-compose-dev.yml up -d 起動後、ブラウザで http://localhost にアクセスすればWindmillが使えます。 注意: windmill_worker に /var/run/docker.sock をマウントしていますが、Windows の Docker Desktop は通常これをサポートしています。もし問題が出る場合はそのボリューム行を削除してください。 --- Caddyfile.local | 12 +++ docker-compose-dev.yml | 84 +++++++-------------- workflows/u/antigravity/git_sync__flow/a.sh | 6 +- 3 files changed, 43 insertions(+), 59 deletions(-) create mode 100644 Caddyfile.local diff --git a/Caddyfile.local b/Caddyfile.local new file mode 100644 index 0000000..9ab7e62 --- /dev/null +++ b/Caddyfile.local @@ -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 +} diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index aa4b50a..e85e345 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -8,10 +8,8 @@ x-logging: &default-logging compress: "true" networks: - traefik-net: - external: true # Traefik管理下のネットワーク windmill-internal: - driver: bridge # Windmill内部通信用 + driver: bridge services: db: @@ -25,7 +23,7 @@ services: expose: - 5432 environment: - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + POSTGRES_PASSWORD: ${DATABASE_PASSWORD} POSTGRES_DB: windmill healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ] @@ -39,46 +37,30 @@ services: windmill_server: image: ${WM_IMAGE} container_name: windmill_server - pull_policy: always + pull_policy: if_not_present deploy: replicas: 1 restart: unless-stopped expose: - 8000 - - 2525 environment: - DATABASE_URL=${DATABASE_URL} - MODE=server + - BASE_URL=http://localhost depends_on: db: condition: service_healthy volumes: - 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: - - traefik-net - windmill-internal logging: *default-logging windmill_worker: image: ${WM_IMAGE} - pull_policy: always + pull_policy: if_not_present deploy: - replicas: 3 + replicas: 1 resources: limits: cpus: "1" @@ -95,14 +77,13 @@ services: - /var/run/docker.sock:/var/run/docker.sock - worker_dependency_cache:/tmp/windmill/cache - worker_logs:/tmp/windmill/logs - - /home/windmill/windmill:/workspace networks: - windmill-internal logging: *default-logging windmill_worker_native: image: ${WM_IMAGE} - pull_policy: always + pull_policy: if_not_present deploy: replicas: 1 resources: @@ -125,35 +106,12 @@ services: - windmill-internal 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: - image: ghcr.io/windmill-labs/windmill-extra:latest - pull_policy: always + image: ghcr.io/windmill-labs/windmill-extra:${WM_VERSION} + pull_policy: if_not_present restart: unless-stopped expose: - 3001 - - 3002 - 3003 environment: - ENABLE_LSP=true @@ -168,15 +126,27 @@ services: networks: - windmill-internal logging: *default-logging - # Caddyは使わない(Traefikを使用) - # caddy: - # deploy: - # replicas: 0 + + caddy: + image: caddy:2.9-alpine + 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: db_data: null worker_dependency_cache: null worker_logs: null - worker_memory: null - windmill_index: null lsp_cache: null + caddy_data: null + caddy_config: null diff --git a/workflows/u/antigravity/git_sync__flow/a.sh b/workflows/u/antigravity/git_sync__flow/a.sh index ced16cc..c150bbf 100644 --- a/workflows/u/antigravity/git_sync__flow/a.sh +++ b/workflows/u/antigravity/git_sync__flow/a.sh @@ -50,8 +50,10 @@ if [[ -n $(git status --porcelain) ]]; then git commit -m "Auto-sync: ${TIMESTAMP}" echo -e "${YELLOW}Pushing to Gitea...${NC}" - # リモートURLにトークンが含まれていない場合、プッシュに失敗する可能性がある - # ここでは既存のoriginを使用 + # リモートの変更を先に取り込む(ローカルPCからのpushがある場合に備えて) + git pull --rebase origin main || { + echo -e "${RED}Failed to pull from remote. Trying push anyway...${NC}" + } git push origin main || { 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://@gitea.keinafarm.net/...${NC}"