feat: add persistent local Compose integration environment

This commit is contained in:
2026-09-27 09:35:49 +08:00
parent 2ec13bf662
commit 98ff028228
6 changed files with 380 additions and 0 deletions

58
deploy/local/compose.yml Normal file
View File

@@ -0,0 +1,58 @@
# 叠加 deploy/docker-compose.yml;使用 scripts/orbit-local.py 固定项目和私密配置。
services:
archive-init:
image: mysql:8.4
restart: "no"
user: "0:0"
entrypoint: ["/bin/sh", "-ec"]
command: ["chown 65532:65532 /archives && chmod 700 /archives"]
volumes:
- orbit-archives:/archives
bootstrap:
profiles: ["tools"]
image: ${ORBIT_IMAGE}
user: ${ORBIT_LOCAL_USER}
entrypoint: ["/usr/local/bin/orbit-admin"]
command: ["verify"]
environment:
ORBIT_MYSQL_DSN: "root:${ORBIT_DB_ROOT_PASSWORD}@tcp(mysql:3306)/${ORBIT_DB_NAME}?parseTime=true&multiStatements=true"
volumes:
- ${ORBIT_LOCAL_DIRECTORY}:/run/local
orbit:
build:
context: ..
dockerfile: Dockerfile
args:
VERSION: ${ORBIT_BUILD_VERSION}
REVISION: ${ORBIT_BUILD_REVISION}
BUILD_TIME: ${ORBIT_BUILD_TIME}
depends_on:
archive-init:
condition: service_completed_successfully
environment:
ORBIT_ARCHIVE_ROOT: /var/lib/orbit/archives
ORBIT_ARCHIVE_STORAGE_ID: ${ORBIT_ARCHIVE_STORAGE_ID}
ORBIT_ARCHIVE_MAX_BYTES: 1073741824
ORBIT_ARCHIVE_TICK_INTERVAL: 10s
volumes:
- orbit-archives:/var/lib/orbit/archives
networks:
default:
services:
aliases: [orbit-test]
networks:
default:
ipam:
config:
- subnet: ${ORBIT_TEST_BACKEND_SUBNET:-10.253.240.0/24}
services:
name: orbit-test-services
ipam:
config:
- subnet: ${ORBIT_TEST_SERVICES_SUBNET:-10.253.241.0/24}
volumes:
orbit-archives: