-
Notifications
You must be signed in to change notification settings - Fork 106
/
docker-compose.yml
67 lines (61 loc) · 1.58 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
60
61
62
63
64
65
66
67
version: '3'
services:
mtianyan_elasticsearch:
restart: always
image: elasticsearch:7.9.1
volumes:
- "./db/es:/usr/share/elasticsearch/data"
environment:
- discovery.type=single-node
networks:
- search-spider
mtianyan_redis:
# 指定镜像
image: redis:4
volumes:
# 目录映射
- "./deploy_conf/redis:/usr/local/etc/redis"
- "./db/redis:/data"
command:
# 执行的命令
redis-server /usr/local/etc/redis/redis.conf
networks:
- search-spider
mtianyan_nginx:
restart: always
image: nginx
ports:
- "8080:80"
volumes:
- ./deploy_conf/nginx.conf:/etc/nginx/conf.d/nginx.conf
- .:/PROJECT_ROOT
links:
- mtianyan_search:web
networks:
- search-spider
mtianyan_search:
restart: always
build: .
volumes:
- .:/PROJECT_ROOT
- ./log/uwsgi:/PROJECT_ROOT/log
command: uwsgi -i /PROJECT_ROOT/deploy_conf/uwsgi.ini
networks:
- search-spider
mtianyan_mysql:
image: mysql:8.0
restart: always
command: --default-authentication-plugin=mysql_native_password --mysqlx=0
environment:
- MYSQL_PORT=3306 # cannot change this port to other number
- MYSQL_DATABASE=mtianyanSearch # name you want for the database
- MYSQL_USER=root # change to whatever username you wantr
- MYSQL_ROOT_PASSWORD=mtianyanroot #change to good root password
volumes:
- .:/PROJECT_ROOT
- "./db/mysql:/var/lib/mysql"
- "./sql:/sql"
networks:
search-spider:
external:
name: search-spider