31 lines
610 B
YAML
31 lines
610 B
YAML
version: "3.9"
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: . # 當前目錄為構建上下文
|
|
dockerfile: ./build/Dockerfile
|
|
environment:
|
|
- VERSION=1.0.0
|
|
- BUILT=$(date +%Y-%m-%d)
|
|
- GIT_COMMIT=$(git rev-parse --short HEAD)
|
|
- SSH_PRV_KEY=${SSH_PRV_KEY} # 傳遞私鑰,用於私有倉庫
|
|
ports:
|
|
- "8888:8888"
|
|
depends_on:
|
|
- mongo
|
|
- redis
|
|
volumes:
|
|
- ./etc:/app/etc
|
|
|
|
mongo:
|
|
image: mongo:8.0
|
|
container_name: mongo
|
|
ports:
|
|
- "27017:27017"
|
|
|
|
redis:
|
|
image: redis:7.0
|
|
container_name: redis
|
|
ports:
|
|
- "6379:6379" |