-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yml
195 lines (185 loc) · 4.9 KB
/
compose.yml
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
services:
db-test.liexp.dev:
image: postgres:14
ports:
- "127.0.0.1:9432:5432"
environment:
POSTGRES_USER: liexp
POSTGRES_PASSWORD: liexp-password
POSTGRES_DB: liexp-test
db.liexp.dev:
image: postgres:14
ports:
- "127.0.0.1:8432:5432"
environment:
POSTGRES_USER: liexp
POSTGRES_PASSWORD: liexp-password
POSTGRES_DB: liexp
VIRTUAL_HOST: db.liexp.dev
VIRTUAL_PORT: 5432
restart: on-failure
volumes:
- ./services/api/db/dump:/docker-entrypoint-initdb.d
- db-data:/var/lib/postgresql/data
networks:
- reverseproxy
fra1.space.liexp.dev:
image: minio/minio:latest
command: server --console-address ":9001" /data
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
environment:
MINIO_ROOT_USER: space-access-key-id
MINIO_ROOT_PASSWORD: space-access-key-secret-id
VIRTUAL_HOST: fra1.space.liexp.dev
VIRTUAL_PORT: 9000
volumes:
- space-data:/data
restart: on-failure
networks:
- reverseproxy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://fra1.space.liexp.dev:9000/minio/health/live"]
# interval: 10s
# timeout: 20s
# retries: 3
api-base:
build:
context: .
target: dev
dockerfile: api.Dockerfile
env_file:
- ./services/api/.env
- ./services/api/.env.local
environment:
NODE_ENV: development
DEBUG: "@liexp*"
DB_HOST: db.liexp.dev
DB_PORT: 5432
SERVER_PORT: 80
depends_on:
- db.liexp.dev
- fra1.space.liexp.dev
volumes:
- api-node-modules:/usr/src/app/node_modules
- ./packages/@liexp:/usr/src/app/packages/@liexp:ro
- ./services/api:/usr/src/app/services/api:cached
- ./services/api/temp:/usr/src/app/services/api/temp:rw
working_dir: /usr/src/app/services/api
api.liexp.dev:
extends: api-base
depends_on:
- db.liexp.dev
- fra1.space.liexp.dev
healthcheck:
test: ["CMD", "curl", "-f", "http://api.liexp.dev/v1/healthcheck"]
interval: 10s
timeout: 20s
retries: 10
start_period: 15s
command: pnpm docker:dev
restart: always
mem_limit: 1G
networks:
- reverseproxy
worker.liexp.dev:
extends: api-base
command: pnpm docker:worker-dev
environment:
TG_BOT_POLLING: "true"
mem_limit: 512M
depends_on:
- db.liexp.dev
- fra1.space.liexp.dev
networks:
- reverseproxy
ai-bot:
build:
context: .
target: dev
dockerfile: ai-bot.Dockerfile
env_file:
- ./services/ai-bot/.env.local
- ./services/ai-bot/.env
command: pnpm docker:dev
working_dir: /usr/src/app/services/ai-bot
volumes:
- ai-bot-node-modules:/usr/src/app/node_modules
- ./packages/@liexp:/usr/src/app/packages/@liexp:ro
- ./services/ai-bot:/usr/src/app/services/ai-bot:cached
- ./services/ai-bot/temp:/usr/src/app/services/ai-bot/temp:rw
- ./services/ai-bot/ai-bot.config.json:/usr/src/app/services/ai-bot/ai-bot.config.json:rw
mem_limit: 512M
depends_on:
- api.liexp.dev
networks:
- reverseproxy
liexp.dev:
build:
context: .
target: dev
dockerfile: web.Dockerfile
env_file:
- ./services/web/.env
ports:
# hmr port
- "127.0.0.1:24678:24678"
volumes:
- web-node-modules:/usr/src/app/node_modules
- ./tsconfig.json:/usr/src/app/tsconfig.json
- ./packages/@liexp:/usr/src/app/packages/@liexp:ro
- ./services/web:/usr/src/app/services/web:cached
working_dir: /usr/src/app/services/web
command: pnpm docker:dev
mem_limit: 2G
tty: true
stdin_open: true
depends_on:
- api.liexp.dev
- fra1.space.liexp.dev
# healthcheck:
# test: ["CMD", "curl", "-f", "http://liexp.dev/healthcheck"]
# interval: 10s
# timeout: 20s
# retries: 10
# start_period: 15s
networks:
- reverseproxy
admin.liexp.dev:
build:
context: .
target: dev
dockerfile: adminWeb.Dockerfile
env_file:
- ./services/admin-web/.env
volumes:
- admin-node-modules:/usr/src/app/node_modules
- ./tsconfig.json:/usr/src/app/tsconfig.json
- ./packages/@liexp:/usr/src/app/packages/@liexp:ro
- ./services/admin-web:/usr/src/app/services/admin-web:cached
working_dir: /usr/src/app/services/admin-web
command: pnpm docker:dev
tty: true
depends_on:
- liexp.dev
- api.liexp.dev
- fra1.space.liexp.dev
# healthcheck:
# test: ["CMD", "curl", "-f", "http://liexp.dev:4001/"]
# interval: 10s
# timeout: 20s
# retries: 10
# start_period: 15s
networks:
- reverseproxy
volumes:
db-data: {}
api-node-modules: {}
ai-bot-node-modules: {}
web-node-modules: {}
admin-node-modules: {}
space-data: {}
networks:
reverseproxy:
external: true