-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
100 lines (88 loc) · 2.6 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
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
version: "2"
services:
web:
image: nginx:latest
ports:
- "80:80"
restart: always
volumes:
- ./app:/www/web
- ./services/web/nginx/conf:/etc/nginx
- ./services/web/nginx/logs:/www/web_logs
networks:
- code-network
mysql:
image: mysql:5.7
volumes:
- ./db/mysql/data:/var/lib/mysql
- ./db/mysql/example_db:/var/example_db
- ./db/mysql/conf.d:/etc/mysql/conf.d
restart: always
environment:
- MYSQL_ROOT_PASSWORD=Fec123456
- MYSQL_DATABASE=fecshop_trace
networks:
- code-network
mongodb:
image: mongo:3.7
restart: always
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/data/logs
volumes:
- ./db/mongodb/data:/data/db
- ./db/mongodb/example_db:/data/example_db
- ./db/mongodb/logs:/data/logs
- ./db/mongodb/etc/mongod.conf:/etc/mongod.conf
networks:
- code-network
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.3
restart: always
container_name: elasticsearch1
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m -XX:+AssumeMP"
command: elasticsearch -Etransport.host=0.0.0.0
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
mem_limit: 1g
cap_add:
- IPC_LOCK
volumes:
- esdata12:/usr/share/elasticsearch/data
networks:
- code-network
golang:
build:
context: ./services/golang/docker/
restart: always
volumes:
- ./services/golang/etc/fec-go:/etc/fec-go
- ./services/golang/ip_lib:/www/test/ip/GeoLite2-City_20180327
- ./services/golang/logs/fec-go/global.log:/www/web_logs/fec-go/global.log
- ./services/golang/logs/fec-go/router_info.log:/www/web_logs/fec-go/router_info.log
- ./services/golang/logs/fec-go/router_error.log:/www/web_logs/fec-go/router_error.log
- ./services/golang/logs/fec-go-shell/global.log:/www/web_logs/fec-go-shell/global.log
- ./services/golang/logs/fec-go-shell/router_info.log:/www/web_logs/fec-go-shell/router_info.log
- ./services/golang/logs/fec-go-shell/router_error.log:/www/web_logs/fec-go-shell/router_error.log
depends_on:
- mongodb
- mysql
- elasticsearch1
networks:
- code-network
ports:
- 3000:3000
volumes:
esdata12:
driver: local
networks:
code-network:
driver: bridge