Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Marcus778899
Customer_data_platform
Repository navigation
Code
Issues
22
(22)
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
develop
Breadcrumbs
Customer_data_platform
/
compose.yaml
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
37 lines (35 loc) · 1.77 KB
develop
Breadcrumbs
Customer_data_platform
/
compose.yaml
Copy path
Top
File metadata and controls
Code
Blame
37 lines (35 loc) · 1.77 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# 本機跑後端全部測試(含 acceptance/)的入口;用法與取捨見 docs/design/INIT-01.md「驗證方式」。
# 在主目錄單獨一行執行(不可包進 make/script):
# docker compose --env-file .env -f .worktrees/<id>/compose.yaml run --rm test
# 不設 name:專案名稱 = compose 檔所在目錄(worktree 名稱),平行的單各自一套。
# 本地 PostgreSQL/RabbitMQ 仍在 docker-compose.yml(make infra-up),與此檔無關。
services:
test:
image: eclipse-temurin:17-jdk
# 掛 Docker socket:測試沿用 Testcontainers 自起 PostgreSQL/RabbitMQ(含 docker pause)。
# socket 等同主機 Docker 的 root 權限,故以 root 跑、原始碼唯讀掛載、不寫回主機。
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./api:/src/api:ro
# EnvExampleNoTenantIdAcceptanceTest 從 user.dir 往上找 .env.example
- ./.env.example:/workspace/.env.example:ro
# Maven 相依與 wrapper 下載的快取;固定名稱,所有 worktree 共用
- m2:/root/.m2
environment:
# Testcontainers 起的容器是主機 Docker 的兄弟容器,經主機的對外 port 連
TESTCONTAINERS_HOST_OVERRIDE: host.docker.internal
extra_hosts:
# Linux 引擎沒有內建 host.docker.internal;Docker Desktop 照常
- "host.docker.internal:host-gateway"
working_dir: /workspace/api
# 複製原始碼(不含 target/)到容器內再建置:主機的 api/target 不受影響、不留 root 擁有的檔案
command:
- sh
- -c
- >-
mkdir -p /workspace/api &&
tar -C /src/api --exclude=./target -cf - . | tar -C /workspace/api -xf - &&
sh ./mvnw -B -ntp verify -Dsurefire.useFile=false
volumes:
m2:
name: cdp-test-m2
You can’t perform that action at this time.