mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
29 lines
691 B
YAML
29 lines
691 B
YAML
services:
|
|
opencode2api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: opencode2api:local
|
|
restart: unless-stopped
|
|
environment:
|
|
CONFIG_PATH: /app/config.json
|
|
LISTEN_ADDRESS: 0.0.0.0:8080
|
|
ports:
|
|
- "${OPENCODE2API_PORT:-8080}:8080"
|
|
volumes:
|
|
- .:/app
|
|
- opencode2api-state:/var/lib/opencode2api
|
|
- go-build-cache:/root/.cache/go-build
|
|
- go-module-cache:/go/pkg/mod
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:8080/healthz"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
opencode2api-state:
|
|
go-build-cache:
|
|
go-module-cache:
|