-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
59 lines (56 loc) · 1.21 KB
/
docker-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
version: '3.9'
services:
mydb:
restart: always
image: mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_PASSWORD: "114514"
MYSQL_DATABASE: news_recommend
container_name: mydb
ports:
- "3306:3306"
tty: true
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 30s
interval: 1s
retries: 30
backend:
restart: on-failure
build:
context: ./backend
args:
PROXY: http://192.168.0.109:7890
image: backend
container_name: backend
environment:
MYSQL_ROOT_PASSWORD: "114514"
MYSQL_DATABASE: "news_recommend"
MYSQL_HOST: "mydb"
MYSQL_PORT: "3306"
KEY_WORDS_HOST: "key_words"
ports:
- "8080:8080"
tty: true
depends_on:
mydb:
condition: service_healthy
frontend:
build:
context: ./frontend
args:
NEXT_PUBLIC_API_BASE_URL: http://192.168.0.104:8080/api
image: frontend
container_name: frontend
ports:
- "80:3000"
depends_on:
- backend
- key_words
key_words:
build: ./key_words
image: key_words
container_name: key_words
ports:
- "50052:50052"