build: 添加 x86 和 arm64 双架构部署包
- 构建 x86 (linux/amd64) backend 和 frontend 镜像 - 导出 arm64 和 x86 两种架构的 tar.gz 镜像包 - 添加 docker-compose.x86.yml 和 docker-compose.arm64.yml - install.sh 自动检测架构并加载对应镜像 - 部署包约 200MB (backend 75M x2 + frontend 24M x2 + postgres 106M)
This commit is contained in:
37
deploy/docker-compose.arm64.yml
Normal file
37
deploy/docker-compose.arm64.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_DB: debt_manager
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "54326:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
backend:
|
||||
image: debt-manager-backend:latest
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/debt_manager
|
||||
SECRET_KEY: change-this-in-production-please
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
image: debt-manager-frontend:latest
|
||||
ports:
|
||||
- "806:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in New Issue
Block a user