-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ecs.yml
More file actions
102 lines (95 loc) · 2.84 KB
/
Copy pathdocker-compose.ecs.yml
File metadata and controls
102 lines (95 loc) · 2.84 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
version: "2.1"
services:
postgres:
image: ${POSTGRES_IMAGE:-pgvector/pgvector:pg16}
container_name: ruici-postgres
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-302304}
POSTGRES_DB: ${POSTGRES_DB:-ruici_ai_platform}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
network_mode: host
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: ${REDIS_IMAGE:-redis:6.2.14}
container_name: ruici-redis
env_file:
- .env
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD:-302304}"]
volumes:
- redis_data:/data
network_mode: host
healthcheck:
test: ["CMD-SHELL", "redis-cli -a ${REDIS_PASSWORD:-302304} ping | grep PONG"]
interval: 5s
timeout: 3s
retries: 5
minio:
image: ${ECS_STORAGE_IMAGE:-minio/minio}
container_name: ruici-minio
command: ["server", "/data", "--console-address", ":9001"]
env_file:
- .env
environment:
MINIO_ROOT_USER: ${APP_STORAGE_ACCESS_KEY:-minioadmin}
MINIO_ROOT_PASSWORD: ${APP_STORAGE_SECRET_KEY:-minioadmin}
volumes:
- minio_data:/data
network_mode: host
createbuckets:
image: ${MINIO_MC_IMAGE:-minio/mc}
env_file:
- .env
depends_on:
- minio
network_mode: host
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set mys3 http://127.0.0.1:9000 ${APP_STORAGE_ACCESS_KEY:-minioadmin} ${APP_STORAGE_SECRET_KEY:-minioadmin};
/usr/bin/mc mb --ignore-existing mys3/${APP_STORAGE_BUCKET:-ruici-ai-platform};
/usr/bin/mc anonymous set public mys3/${APP_STORAGE_BUCKET:-ruici-ai-platform};
exit 0;
"
app:
build:
context: .
dockerfile: Dockerfile
args:
BUILDER_IMAGE: ${BACKEND_BUILDER_IMAGE:-maven:3.9.11-eclipse-temurin-21}
RUNTIME_IMAGE: ${BACKEND_RUNTIME_IMAGE:-eclipse-temurin:21-jre}
container_name: ruici-app
env_file:
- .env
depends_on:
- postgres
- redis
- minio
volumes:
- ./.env:/app/.env:ro
network_mode: host
frontend:
build:
context: ./frontend
args:
BUILDER_IMAGE: ${FRONTEND_BUILDER_IMAGE:-node:20-alpine}
RUNTIME_IMAGE: ${FRONTEND_RUNTIME_IMAGE:-nginx:alpine}
NPM_REGISTRY: ${FRONTEND_NPM_REGISTRY:-https://registry.npmjs.org/}
FRONTEND_NODE_OPTIONS: ${FRONTEND_NODE_OPTIONS:---max-old-space-size=512}
container_name: ruici-frontend
depends_on:
- app
volumes:
- ./frontend/nginx.ecs.conf:/etc/nginx/conf.d/default.conf:ro
network_mode: host
volumes:
postgres_data:
redis_data:
minio_data: