Files
opsx-licence/docker-compose.yml
T
Logan.LiandCursor cb1a9be2c4 chore: 增加 Docker 单容器部署
生产用 Dockerfile + compose 嵌入前端二进制,run.sh docker 一键构建启动。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-12 12:02:29 +08:00

37 lines
861 B
YAML

# opsx-licence Docker 部署(单容器:管理后台 + /api)
# 用法:
# cp .env.example .env # 填 JWT / Waffo
# docker compose up -d --build
# # 或旧版: docker-compose up -d --build
# 署名 Logan.Li
services:
opsx-licence:
image: opsx-licence:${VERSION:-latest}
build:
context: .
dockerfile: Dockerfile
container_name: opsx-licence
restart: unless-stopped
ports:
- "${HOST_PORT:-9001}:9001"
env_file:
- .env
environment:
TZ: Asia/Shanghai
PORT: "9001"
GIN_MODE: ${GIN_MODE:-release}
DB_DRIVER: sqlite
DB_NAME: /data/db.sqlite3
volumes:
- licence_data:/data
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:9001/health"]
interval: 15s
timeout: 3s
retries: 5
start_period: 15s
volumes:
licence_data: