-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
170 lines (157 loc) · 4.2 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: '3.2'
networks:
default:
ipam:
driver: default
config:
- subnet: 172.19.0.0/24
services:
dns:
image: coredns/coredns:1.2.0
command: -conf /etc/coredns/Corefile
container_name: dns
networks:
default:
ipv4_address: 172.19.0.2
aliases: [ns1.localhost]
ports:
- "5300:53/udp"
volumes:
- ./docker/dns:/etc/coredns
postgres:
image: postgres:9.6
depends_on: [dns]
dns: [172.19.0.2]
networks:
default:
aliases: [db1.localhost]
ports:
- "5432:5432"
# environment:
# - PGDATA=/var/lib/postgresql/data/pgdata
volumes:
# - ./pgdata:/var/lib/postgresql/data/pgdata
- ./docker/postgres/initdb:/docker-entrypoint-initdb.d
kafka:
image: landoop/fast-data-dev:1.1.0
depends_on: [dns]
dns: [172.19.0.2]
environment:
- ADV_HOST=kafka.localhost
- SAMPLEDATA=0
networks:
default:
aliases: [kafka.localhost]
ports:
- "2181:2181"
- "9092:9092"
- "3030:3030"
- "8081:8081"
scdf:
image: springcloud/spring-cloud-dataflow-server-local:1.7.0.RELEASE
container_name: scdf
depends_on: [dns, postgres, config-server]
dns: [172.19.0.2]
networks:
default:
aliases: [dataflow.localhost]
ports:
- "9393:9393"
- "9995-9998:9995-9998"
volumes:
- ~/.m2:/root/.m2
environment:
- spring.cloud.deployer.local.javaOpts=-Dspring.profiles.active=docker
- spring.cloud.dataflow.applicationProperties.stream.spring.profiles.include=docker
- spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.kafka.binder.brokers=kafka.localhost:9092
- spring.cloud.dataflow.applicationProperties.stream.spring.cloud.stream.kafka.binder.zkNodes=kafka.localhost:2181
- spring.datasource.url=jdbc:postgresql://db1.localhost:5432/scdf
- spring.datasource.username=scdf
- spring.datasource.password=scdf
- spring.datasource.driver-class-name=org.postgresql.Driver
scdf-config:
image: alpine
depends_on: [dns, scdf]
volumes:
- ./docker:/docker
command: docker/scdf/setup.sh
config-server:
image: hyness/spring-cloud-config-server
container_name: config-server
depends_on: [dns]
dns: [172.19.0.2]
networks:
default:
aliases: [config-server.localhost]
ports:
- "8888:8888"
volumes:
- ./cloud-config:/config
environment:
- SPRING_PROFILES_ACTIVE=native
- SPRING_CLOUD_CONFIG_SERVER_NATIVE_ADDLABELLOCATIONS=false
mongo:
image: mongo
restart: always
depends_on: [dns, scdf]
dns: [172.19.0.2]
networks:
default:
aliases: [mongo.localhost]
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
mongo-config:
image: mongo
depends_on: [dns, mongo]
dns: [172.19.0.2]
networks:
default:
aliases: [mongo-config.localhost]
volumes:
- ./docker:/docker
command: docker/mongo/setup.sh
mongo-express:
image: mongo-express
restart: always
depends_on: [dns, scdf]
dns: [172.19.0.2]
networks:
default:
aliases: [mongo-express.localhost]
ports:
- "8889:8081"
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=example
prometheus:
image: prom/prometheus
depends_on: [dns, scdf]
dns: [172.19.0.2]
container_name: prometheus
networks:
default:
aliases: [prometheus.localhost]
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana
depends_on: [dns, prometheus]
dns: [172.19.0.2]
networks:
default:
aliases: [grafana.localhost]
volumes:
- ./docker/grafana/datasources/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
# - ./grafana/dashboards:/etc/grafana/dashboards
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false