-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathdocker-compose.yaml
126 lines (116 loc) · 2.49 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
version: "3"
services:
api:
build:
context: ./easy-test-flask
dockerfile: Dockerfile
image: guojiaxing1995/easy-test-api:v1
container_name: api
restart: always
expose:
- 5000
command: ["api"]
environment:
- SITE_DOMAIN=http://yourwebsite
networks:
- easy-test
ports:
- 8085:5000
volumes:
- ./logs/api/:/easy-test-flask/logs/
- ./static/assets/:/easy-test-flask/app/assets/
- ./static/document/:/easy-test-flask/app/document/
worker1:
build:
context: ./easy-test-flask
dockerfile: Dockerfile
image: guojiaxing1995/easy-test-api:v1
container_name: worker1
restart: always
expose:
- 5000
command: ["worker"]
networks:
- easy-test
volumes:
- ./logs/worker1/:/easy-test-flask/logs/
worker2:
build:
context: ./easy-test-flask
dockerfile: Dockerfile
image: guojiaxing1995/easy-test-api:v1
container_name: worker2
restart: always
expose:
- 5000
command: ["worker"]
networks:
- easy-test
volumes:
- ./logs/worker2/:/easy-test-flask/logs/
web:
build: ./easy-test-vue
image: guojiaxing1995/easy-test-web:v1
container_name: web
restart: always
ports:
- 80:80
- 443:443
networks:
- easy-test
mysql:
image: mysql:5.7
container_name: mysql
restart: always
ports:
- 8081:3306
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=easy-test
volumes:
- mysql5.7:/var/lib/mysql
- ./mysql/mysql.cnf:/etc/mysql/conf.d/mysql.cnf
networks:
- easy-test
mongo:
image: mongo:4.2
container_name: mongo
restart: always
expose:
- 27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongo2020
volumes:
- mongodb4.2:/data/db
ports:
- 8090:27017
networks:
- easy-test
rabbitmq:
image: rabbitmq:3.8-management
container_name: rabbitmq
restart: always
expose:
- 15672
- 5672
environment:
- RABBITMQ_DEFAULT_VHOST=my_vhost
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=ftlb2000
volumes:
- rabbitmq_data:/var/lib/rabbitmq
ports:
- 8084:15672
- 8083:5672
networks:
- easy-test
networks:
easy-test:
driver: bridge
volumes:
mysql5.7:
rabbitmq_data:
mongodb4.2: