mirror of
https://github.com/okxlin/appstore.git
synced 2026-09-22 16:00:58 +00:00
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
services:
|
|
opencode:
|
|
image: "ghcr.io/anomalyco/opencode:2.0.8"
|
|
container_name: ${CONTAINER_NAME}
|
|
restart: unless-stopped
|
|
user: "1000:1000"
|
|
command: ["serve", "--hostname", "0.0.0.0", "--port", "4096"]
|
|
networks:
|
|
- 1panel-network
|
|
ports:
|
|
- "${PANEL_APP_PORT_HTTP}:4096"
|
|
volumes:
|
|
- "${APP_DATA_DIR}:/home/opencode"
|
|
environment:
|
|
- HOME=/home/opencode
|
|
- OPENCODE_SERVER_USERNAME=${OPENCODE_SERVER_USERNAME}
|
|
- OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD}
|
|
- TZ=${TZ}
|
|
stop_grace_period: 15s
|
|
healthcheck:
|
|
test:
|
|
- CMD-SHELL
|
|
- >-
|
|
auth="$$(printf '%s:%s' "$${OPENCODE_SERVER_USERNAME}" "$${OPENCODE_SERVER_PASSWORD}" | base64 | tr -d '\n')";
|
|
wget -q -O /dev/null --header "Authorization: Basic $$auth" http://127.0.0.1:4096/global/health
|
|
interval: 1m
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
labels:
|
|
createdBy: "Apps"
|
|
|
|
networks:
|
|
1panel-network:
|
|
external: true
|