forked from 869413421/ai-moive-studio
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (80 loc) · 2.14 KB
/
docker-compose.yml
File metadata and controls
86 lines (80 loc) · 2.14 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
version: '3.8'
# AICG平台基础设施服务 - 仅包含PostgreSQL、Redis、MinIO
# 后端应用在本地运行,通过localhost访问这些服务
services:
# PostgreSQL 数据库
postgres:
image: postgres:15-alpine
container_name: aicg-postgres
restart: unless-stopped
environment:
POSTGRES_DB: aicg_platform
POSTGRES_USER: aicg_user
POSTGRES_PASSWORD: aicg_password
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
networks:
- aicon-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U aicg_user -d aicg_platform" ]
interval: 30s
timeout: 10s
retries: 5
# Redis 缓存和消息队列
redis:
image: redis:7-alpine
container_name: aicg-redis
restart: unless-stopped
command: redis-server --appendonly yes --requirepass redis_password
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- aicon-network
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 30s
timeout: 10s
retries: 5
# MinIO 对象存储
minio:
image: minio/minio:latest
container_name: aicg-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin123
MINIO_BROWSER_REDIRECT_URL: http://localhost:9001
ports:
- "9000:9000" # API
- "9001:9001" # Console
volumes:
- minio_data:/data
networks:
- aicon-network
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 10s
retries: 5
# 网络配置
networks:
aicon-network:
driver: bridge
ipam:
config:
- subnet: 192.168.222.0/24
# 数据卷配置
volumes:
postgres_data:
driver: local
redis_data:
driver: local
minio_data:
driver: local