-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
81 lines (58 loc) · 1.83 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
version: '3'
# https://docs.docker.com/compose/compose-file/
# Notes:
# EXPOSE is used to expose ports without publishing them to the host machine —
# they’ll only be accessible to linked services on the same network.
# The EXPOSE instruction does not actually publish the port.
# It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published.
# PORTS is used to publish ports to a host.
# You can either use a short syntax, or give a more detailed configuration.
# Either specify both ports (HOST:CONTAINER), or just the container port (an random, temporory host port is chosen).
services:
mongo:
image: mongo
restart: always
ports:
- "27017:27017"
# volumes:
# - /data/db:/var/lib/docker/volumes/<volume-name>
environment:
MONGO_INITDB_ROOT_USERNAME: ""
MONGO_INITDB_ROOT_PASSWORD: ""
mongo-express:
image: mongo-express
restart: always
ports:
- "8081:8081"
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_SERVER: "mongo"
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_ADMINUSERNAME: ""
ME_CONFIG_MONGODB_ADMINPASSWORD: ""
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181"
kafka:
image: wurstmeister/kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka # use localhost for single broker
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "topicname:1:1"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
application:
build: ./application
restart: on-failure
ports:
- "80"
depends_on:
- mongo
- kafka