-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcompose.yml
More file actions
executable file
·102 lines (96 loc) · 3.65 KB
/
compose.yml
File metadata and controls
executable file
·102 lines (96 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
services:
build:
build: .
image: orchestrator:latest
# ── Rust binary build (macOS host에 cargo 없을 때) ──────────────────────
# Usage: docker compose run --rm dev
dev:
image: rust:1.92-bookworm
working_dir: /app
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
command: >
sh -c "
cargo build --release &&
mkdir -p bin &&
cp target/release/orchestrator bin/orchestrator-linux-x64 &&
echo 'Rust build complete: bin/orchestrator-linux-x64'
"
# ── Rust linux-arm64 build ──────────────────────────────────────────────
# Usage: docker compose run --rm rust-arm64
rust-arm64:
image: rust:1.92-bookworm
working_dir: /app
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
command: >
sh -c "
rustup target add aarch64-unknown-linux-gnu &&
apt-get update -q && apt-get install -y -q gcc-aarch64-linux-gnu &&
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
cargo build --release --target aarch64-unknown-linux-gnu &&
mkdir -p bin &&
cp target/aarch64-unknown-linux-gnu/release/orchestrator bin/orchestrator-linux-arm64 &&
echo 'arm64 build complete: bin/orchestrator-linux-arm64'
"
# ── Windows cross-compile ───────────────────────────────────────────────
win-builder:
build:
context: .
dockerfile: Dockerfile.windows
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
command: >
sh -c "
cargo build --release --target x86_64-pc-windows-gnu &&
mkdir -p bin &&
cp target/x86_64-pc-windows-gnu/release/orchestrator.exe bin/orchestrator-windows-x64.exe &&
echo 'Windows build complete: bin/orchestrator-windows-x64.exe'
"
# ── Rust unit tests ─────────────────────────────────────────────────────
test:
image: rust:1.92-bookworm
working_dir: /app
volumes:
- .:/app
- cargo-cache:/usr/local/cargo/registry
- target-cache:/app/target
command: cargo test
# ── npm release:patch — full pipeline inside Docker ────────────────────
# Node build은 이미 호스트에서 성공하므로 버전 범프 + publish만 실행
# Usage: NPM_TOKEN=xxx docker compose run --rm npm-release
npm-release:
image: node:24-bookworm-slim
working_dir: /app
volumes:
- .:/app
- npm-cache:/root/.npm
environment:
- NODE_ENV=development
- NPM_TOKEN=${NPM_TOKEN:-}
- GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-pf}
- GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-pf@local}
- GIT_COMMITTER_NAME=${GIT_AUTHOR_NAME:-pf}
- GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL:-pf@local}
command: >
sh -c "
apt-get update -q && apt-get install -y -q git &&
git config --global --add safe.directory /app &&
git config --global user.name \"$${GIT_AUTHOR_NAME:-pf}\" &&
git config --global user.email \"$${GIT_AUTHOR_EMAIL:-pf@local}\" &&
npm ci &&
npm run build &&
npm version patch &&
git push --follow-tags &&
npm publish --access public
"
volumes:
cargo-cache:
target-cache:
npm-cache: