Add Gitea CI and automatic dev deployment
Main CI / check-and-build (push) Successful in 1m18s
Development CI / check-and-build (push) Successful in 34s
GitHub Git mirror / mirror (push) Successful in 7s
Development CI / deploy-development (push) Successful in 25s

This commit is contained in:
root committed 2026-10-29 21:30:28 +08:00
1 parent 543564a29c
commit b4f29d4966
20 files changed
+1109 -29

No files matched your search

+25 -12
View File
@@ -1,43 +1,56 @@
name: alphapulse
# Run through scripts/deploy.py so every deployment shares the instance lock.
name: alphapulse-dev
x-backend: &backend
build:
context: ../backend
dockerfile: ../deploy/Dockerfile.backend
image: alphapulse-backend
env_file: ../.env
image: ${ALPHAPULSE_BACKEND_IMAGE:?Set a verified backend digest}
env_file: .env
restart: unless-stopped
stop_grace_period: 60s
networks: [dev_default]
services:
api:
<<: *backend
container_name: AlphaPulse-dev-api
command: [uvicorn, alphapulse.api.main:app, --host, 0.0.0.0, --port, "8000", --proxy-headers, --forwarded-allow-ips, "172.18.0.0/16"]
healthcheck:
test: [CMD, python, -c, "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health', timeout=3)"]
interval: 5s
timeout: 4s
retries: 12
crawler:
<<: *backend
container_name: AlphaPulse-dev-crawler
command: [python, -m, alphapulse.crawler.manager]
# 留时间给 scrapy 子进程优雅退出并刷完日志
stop_grace_period: 30s
market:
<<: *backend
container_name: AlphaPulse-dev-market
command: [python, -m, alphapulse.market.worker]
trader:
<<: *backend
container_name: AlphaPulse-dev-trader
command: [python, -m, alphapulse.trading.engine]
calendar:
<<: *backend
container_name: AlphaPulse-dev-calendar
command: [python, -m, alphapulse.calendar.worker]
web:
build:
context: ../web
dockerfile: ../deploy/Dockerfile.web
image: ${ALPHAPULSE_WEB_IMAGE:?Set a verified web digest}
container_name: AlphaPulse-dev
restart: unless-stopped
depends_on: [api]
depends_on:
api:
condition: service_healthy
healthcheck:
test: [CMD, wget, -q, -O, /dev/null, "http://127.0.0.1/api/health"]
interval: 5s
timeout: 4s
retries: 12
ports:
- 127.0.0.1:21005:80
networks: [dev_default]