-
Notifications
You must be signed in to change notification settings - Fork 0
/
orange.base.yaml
53 lines (52 loc) · 1.76 KB
/
orange.base.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
version: '3'
services:
orange:
container_name: ${APP}_orange
ports:
- '${ORANGE_HTTP_PORT}:80'
- '${ORANGE_API_PORT}:7777'
- '${ORANGE_DASHBOARD_PORT}:9999'
environment:
- MYSQL_HOST=192.167.0.3
- MYSQL_PORT=3306
- MYSQL_DATABASE=orange
- MYSQL_USER=root
- MYSQL_PWD=${MYSQL_ROOT_PASSWORD}
command: 'tail -f /dev/null'
mysql:
container_name: ${APP}_mysql
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${MYSQL_TIMEZONE}
ports:
- '${MYSQL_PORT}:3306'
consul:
container_name: ${APP}_leader_consul
environment:
- CONSUL_BIND_INTERFACE=${CONSULE_GETWAY}
ports:
- '${CONSULE_LEADER_PORT}:8500'
command: 'consul agent -data-dir=/consul/data -config-dir=/consul/config -bind=192.167.0.4 --server=true --bootstrap-expect=2 --client=0.0.0.0 -ui'
consul-follwer-1:
container_name: ${APP}_follwer_1_consul
environment:
- CONSUL_BIND_INTERFACE=${CONSULE_GETWAY}
command: 'consul agent -data-dir=/consul/data -config-dir=/consul/config -bind=192.167.0.5 --server=true --client=0.0.0.0 --join 192.167.0.4'
depends_on:
- consul
consul-follwer-2:
container_name: ${APP}_follwer_2_consul
environment:
- CONSUL_BIND_INTERFACE=${CONSULE_GETWAY}
command: 'consul agent -data-dir=/consul/data -config-dir=/consul/config -bind=192.167.0.6 --server=false --client=0.0.0.0 --join 192.167.0.4'
depends_on:
- consul
upstream-service:
container_name: ${APP}_upstream_service
command: 'go run hello.go'
upstream-service2:
container_name: ${APP}_upstream_service2
command: 'go run hello.go'