1 sder@sder-kvm-yangpeng:~/go/src/epc/services$ (master) cat docker-compose.yml
2 version: '3.3'
3 services:
4 epc-redis:
5 container_name: epc-redis-${VER}
6 hostname: redis
7 image: ${REPOSITORY}/redis:6.0.9
8 ports:
9 - "6379:6379"
10 volumes:
11 - ./config/redis/redis.conf:/etc/redis/redis.conf
12 - ./config/redis/data:/data
13 - /etc/localtime:/etc/localtime:ro
14 restart: always
15 extra_hosts:
16 - "redis:127.0.0.1"
17 environment:
18 - TZ=${TIMEZONE}
19
20 epc-mysql:
21 container_name: epc-mysql-${VER}
22 hostname: mysql
23 image: ${REPOSITORY}/mysql:5.7
24 ports:
25 - "3306:3306"
26 volumes:
27 - ./config/mysql/.data:/var/lib/mysql
28 - ./config/mysql/conf:/etc/mysql/mysql.conf.d
29 - ./config/mysql/script:/docker-entrypoint-initdb.d/
30 - /etc/localtime:/etc/localtime:ro
31 restart: always
32 extra_hosts:
33 - "mysql:127.0.0.1"
34 environment:
35 - MYSQL_ROOT_PASSWORD=123456
36 - TZ=${TIMEZONE}
37
38 epc-mongo:
39 container_name: epc-mongo-${VER}
40 hostname: mongo
41 image: ${REPOSITORY}/mongo:latest
42 ports:
43 - "27017:27017"
44 volumes:
45 - ./config/mongo/.data:/data/db
46 - /etc/localtime:/etc/localtime:ro
47 restart: always
48 entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "mongo-replica" ]
49 extra_hosts:
50 - "mongo:127.0.0.1"
51 environment:
52 - TZ=${TIMEZONE}
53
54 epc-mongo-arb:
55 container_name: epc-mongo-arb-${VER}
56 hostname: mongo
57 image: ${REPOSITORY}/mongo:latest
58 ports:
59 - "27018:27017"
60 volumes:
61 - ./config/mongo/.dataarb:/data/db
62 - /etc/localtime:/etc/localtime:ro
63 restart: always
64 entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "mongo-replica" ]
65 extra_hosts:
66 - "mongo:127.0.0.1"
67 environment:
68 - TZ=${TIMEZONE}
69
70 epc-nginx:
71 container_name: epc-nginx-${VER}
72 hostname: nginx
73 image: ${REPOSITORY}/nginx:latest
74 ports:
75 - "80:80"
76 volumes:
77 - ./config/default.conf:/etc/nginx/conf.d/default.conf
78 - ./config/dev.tar.gz:/home/root/dev.tar.gz
79 - /etc/localtime:/etc/localtime:ro
80 restart: always
81 extra_hosts:
82 - "nginx:127.0.0.1"
83 environment:
84 - TZ=${TIMEZONE}
85
86 epc-web:
87 container_name: epc-web-${VER}
88 hostname: web
89 image: ${REPOSITORY}/java:latest
90 volumes:
91 - ./config/core-network-epc-1.0.0.jar:/home/web/core-network-epc-1.0.0.jar
92 - ./config/start_lmt_epc.sh:/home/web/start_lmt_epc.sh
93 - /etc/localtime:/etc/localtime:ro
94 depends_on:
95 - epc-mysql
96 - epc-mongo
97 - epc-nginx
98 restart: always
99 network_mode: host
100 extra_hosts:
101 - "web:127.0.0.1"
102 environment:
103 - TZ=${TIMEZONE}
104 entrypoint: [ "bash", "/home/web/start_lmt_epc.sh" ]
105
106 epc-mmed:
107 container_name: epc-mmed-${VER}
108 hostname: mmed
109 image: ${REPOSITORY}/${IMAGE}
110 volumes:
111 - ./var/log/epc:${WORKDIR}/var/log/epc/
112 - ./etc/:${WORKDIR}/etc/
113 - /etc/localtime:/etc/localtime:ro
114 depends_on:
115 - epc-mongo
116 restart: always
117 network_mode: host
118 extra_hosts:
119 - "mmed:127.0.0.1"
120 environment:
121 - TZ=${TIMEZONE}
122 entrypoint: [ "epc-mmed", "-l", "${LOGDIR}/mmed.log" ]
123
124 epc-hssd:
125 container_name: epc-hssd-${VER}
126 hostname: hssd
127 image: ${REPOSITORY}/${IMAGE}
128 volumes:
129 - ./var/log/epc:${WORKDIR}/var/log/epc/
130 - ./etc/:${WORKDIR}/etc/
131 - /etc/localtime:/etc/localtime:ro
132 depends_on:
133 - epc-mongo
134 restart: always
135 network_mode: host
136 extra_hosts:
137 - "hssd:127.0.0.1"
138 environment:
139 - TZ=${TIMEZONE}
140 #command: sleep infinity
141 entrypoint: [ "epc-hssd", "-l", "${LOGDIR}/hssd.log" ]
142
143 epc-pcrfd:
144 container_name: epc-pcrfd-${VER}
145 hostname: pcrfd
146 image: ${REPOSITORY}/${IMAGE}
147 volumes:
148 - ./var/log/epc:${WORKDIR}/var/log/epc/
149 - ./etc/:${WORKDIR}/etc/
150 - /etc/localtime:/etc/localtime:ro
151 depends_on:
152 - epc-mongo
153 restart: always
154 network_mode: host
155 extra_hosts:
156 - "pcrfd:127.0.0.1"
157 environment:
158 - TZ=${TIMEZONE}
159 entrypoint: [ "epc-pcrfd", "-l", "${LOGDIR}/pcrfd.log" ]
160
161 epc-pgwd:
162 container_name: epc-pgwd-${VER}
163 hostname: pgwd
164 image: ${REPOSITORY}/${IMAGE}
165 volumes:
166 - ./var/log/epc:${WORKDIR}/var/log/epc/
167 - ./etc/:${WORKDIR}/etc/
168 - /etc/localtime:/etc/localtime:ro
169 depends_on:
170 - epc-mongo
171 restart: always
172 network_mode: host
173 extra_hosts:
174 - "pgwd:127.0.0.1"
175 environment:
176 - TZ=${TIMEZONE}
177 entrypoint: [ "epc-pgwd", "-l", "${LOGDIR}/pgwd.log" ]
178
179 epc-sgwd:
180 container_name: epc-sgwd-${VER}
181 hostname: sgwd
182 image: ${REPOSITORY}/${IMAGE}
183 volumes:
184 - ./var/log/epc:${WORKDIR}/var/log/epc/
185 - ./etc/:${WORKDIR}/etc/
186 - /etc/localtime:/etc/localtime:ro
187 depends_on:
188 - epc-mongo
189 restart: always
190 network_mode: host
191 extra_hosts:
192 - "sgwd:127.0.0.1"
193 environment:
194 - TZ=${TIMEZONE}
195 entrypoint: [ "epc-sgwd", "-l", "${LOGDIR}/sgwd.log" ]
196
197 epc-upf:
198 container_name: epc-upf-${VER}
199 hostname: upf
200 image: ${REPOSITORY}/${UPFIMAGE}
201 volumes:
202 - ./logs:${UPFDIR}/logs
203 - ./config:${UPFDIR}/config
204 - ./config/dpdk/usertools:${UPFDIR}/dpdk/usertools
205 - /etc/localtime:/etc/localtime:ro
206 - /sys/bus/pci/devices:/sys/bus/pci/devices
207 - /sys/kernel/mm/hugepages:/sys/kernel/mm/hugepages
208 - /sys/devices/system/node:/sys/devices/system/node
209 - /dev:/dev:ro
210 - /sbin:/sbin:ro
211 - /bin:/bin:ro
212 restart: always
213 privileged: true
214 user: root
215 extra_hosts:
216 - "upf:127.0.0.1"
217 network_mode: host
218 environment:
219 - TZ=${TIMEZONE}
220 working_dir: ${UPFDIR}
221 # command: sleep infinity
222 entrypoint: [ "./upf.sh" ]