feature/gemini-web-provider #1
23
Dockerfile
23
Dockerfile
|
|
@ -1,23 +0,0 @@
|
||||||
# ── Stage 1: 編譯 ─────────────────────────────────────────────
|
|
||||||
FROM golang:1.25-alpine AS builder
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
COPY go.mod go.sum ./
|
|
||||||
RUN go mod download
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o cursor-api-proxy .
|
|
||||||
|
|
||||||
# ── Stage 2: 執行環境 ──────────────────────────────────────────
|
|
||||||
FROM alpine:3.21
|
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates tzdata
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=builder /build/cursor-api-proxy .
|
|
||||||
|
|
||||||
EXPOSE 8766
|
|
||||||
|
|
||||||
ENTRYPOINT ["./cursor-api-proxy"]
|
|
||||||
Binary file not shown.
|
|
@ -1,27 +0,0 @@
|
||||||
services:
|
|
||||||
cursor-api-proxy:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
image: cursor-api-proxy:latest
|
|
||||||
container_name: cursor-api-proxy
|
|
||||||
restart: unless-stopped
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
ports:
|
|
||||||
- "${CURSOR_BRIDGE_PORT:-8766}:${CURSOR_BRIDGE_PORT:-8766}"
|
|
||||||
environment:
|
|
||||||
- CURSOR_BRIDGE_HOST=0.0.0.0
|
|
||||||
volumes:
|
|
||||||
# Cursor CLI 二進位檔(從宿主機掛載,唯讀)
|
|
||||||
- ${CURSOR_AGENT_HOST_BIN:-/usr/local/bin/agent}:/usr/local/bin/agent:ro
|
|
||||||
# 帳號設定目錄(持久化帳號資料)
|
|
||||||
- ${CURSOR_ACCOUNTS_DIR:-~/.cursor-api-proxy}:/root/.cursor-api-proxy
|
|
||||||
# 工作區(選用,掛載你想讓 agent 存取的專案目錄)
|
|
||||||
- ${WORKSPACE_DIR:-/tmp/workspace}:/workspace
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:${CURSOR_BRIDGE_PORT:-8766}/health"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 3
|
|
||||||
start_period: 10s
|
|
||||||
BIN
gemini-login
BIN
gemini-login
Binary file not shown.
Loading…
Reference in New Issue