feat: publish container images to GHCR

This commit is contained in:
Jason Xu committed 2026-08-20 04:45:14 +08:00
1 parent cc71ba8aff
commit 948ef0be11
6 files changed
+222 -103

No files matched your search

+16 -16
View File
@@ -1,30 +1,30 @@
services:
opencode2api:
build:
context: .
dockerfile: Dockerfile
image: opencode2api:local
image: ghcr.io/jasonxu114514/opencode2api:${OPENCODE2API_VERSION:-latest}
pull_policy: always
restart: unless-stopped
read_only: true
security_opt:
- no-new-privileges:true
environment:
CONFIG_PATH: /app/config.json
CONFIG_PATH: /var/lib/opencode2api/config.json
CONFIG_SEED_PATH: /run/config/opencode2api.json
LISTEN_ADDRESS: 0.0.0.0:8080
WEBUI_LISTEN_ADDRESS: 0.0.0.0:8081
ports:
- "${OPENCODE2API_PORT:-8080}:8080"
- "${OPENCODE2API_WEBUI_PORT:-8081}:8081"
configs:
- source: opencode2api_config
target: /run/config/opencode2api.json
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
tmpfs:
- /tmp
configs:
opencode2api_config:
file: ./config.json
volumes:
opencode2api-state:
go-build-cache:
go-module-cache: