-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
212 lines (201 loc) · 4.82 KB
/
docker-compose.yaml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
version: "3.8"
services:
redis:
image: redis:alpine
container_name: redis
expose:
- 6379
networks:
- private
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 5s
timeout: 5s
retries: 5
db:
image: postgres:16.1
container_name: enhance-db
expose:
- 5432
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME}
volumes:
- ./volumes/enhance-db:/var/lib/postgresql/data
networks:
- private
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
env_file:
- path: ./run.env
required: true
mongo:
image: mongo:7.0.4
container_name: enhance-mongo
expose:
- 27017
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGODB_USER}
- MONGO_INITDB_ROOT_PASSWORD=${MONGODB_PASSWORD}
volumes:
- ./volumes/mongo:/data/db
- ./volumes/mongo-config:/data/configdb
networks:
- private
ports:
- "27017:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
env_file:
- path: ./run.env
required: true
etcd:
image: gcr.io/etcd-development/etcd:v3.5.10
container_name: etcd
expose:
- 2379
- 2380
ports:
- "2379:2379"
volumes:
- ./volumes/enhance-etcd:/etcd-data
entrypoint: /usr/local/bin/etcd
command:
- "--data-dir=/etcd-data"
- "--name=node1"
- "--initial-advertise-peer-urls=http://0.0.0.0:2380"
- "--listen-peer-urls=http://0.0.0.0:2380"
- "--advertise-client-urls=http://0.0.0.0:2379"
- "--listen-client-urls=http://0.0.0.0:2379"
- "--initial-cluster=node1=http://0.0.0.0:2380"
networks:
- private
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
expose:
- 3001
ports:
- "3001:3001"
volumes:
- ./volumes/uptime-kuma:/app/data
networks:
- private
- site
official-site:
image: ghcr.io/enhanceai/official-site-enterprise:latest
container_name: site
expose:
- 80
ports:
- "4321:80"
networks:
- private
- site
enhance-server:
image: ghcr.io/enhanceai/enhance-server-enterprise:latest
container_name: server
expose:
- 3000
ports:
- "3000:3000"
networks:
- private
environment:
- ETCD_URL=http://etcd:2379
depends_on:
- etcd
enhance-api:
image: ghcr.io/enhanceai/enhance-api-enterprise:latest
container_name: api
expose:
- 20502
networks:
- private
- site
ports:
- "20502:20502"
environment:
- CORE_SERVICE_HOST=http://server:3000
- REDIS_HOST=redis
- REDIS_PORT=6379
- POSTGRES_HOST=enhance-db
- POSTGRES_PORT=5432
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_NAME=${DATABASE_NAME}
- ETCD_URL=http://etcd:2379
- MONGODB_URI=mongodb://enhance-mongo:27017
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
mongo:
condition: service_healthy
enhance-admin:
image: ghcr.io/enhanceai/enhance-admin-enterprise:latest
container_name: enhance-admin
expose:
- 8080
ports:
- "8080:8080"
networks:
- private
- site
environment:
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@enhance-db:5432/${DATABASE_NAME}
- ETCD_URL=http://etcd:2379
- MONGODB_URI=mongodb://enhance-mongo:27017
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
- PORTAL_SITE=http://localhost/
- NEXTAUTH_URL=http://localhost:8080/
depends_on:
- enhance-api
gateway:
image: ghcr.io/enhanceai/gateway:latest
container_name: gateway
ports:
- "80:80"
networks:
- site
- private
environment:
- API_HOST=api:20502
- UPTIME_KUMA_HOST=uptime-kuma:3001
- SITE_HOST=site
- ETCD_URL=http://etcd:2379
- POSTGRES_HOST=enhance-db
- POSTGRES_PORT=5432
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- DATABASE_NAME=${DATABASE_NAME}
- APP_DOMAIN=host.docker.internal
depends_on:
- official-site
- enhance-api
- enhance-server
- uptime-kuma
- etcd
- db
- redis
networks:
private:
driver: bridge
site:
driver: bridge