-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.62 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
version: '3'
services:
# Postgre Database
postgres:
image: ${POSTGRES_IMAGE}
container_name: ${POSTGRES_CONTAINER_NAME}
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ${POSTGRES_VOLUME}
networks:
- springboot-network
# MongoDB
mongodb:
image: ${MONGO_IMAGE}
container_name: ${MONGO_CONTAINER_NAME}
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
volumes:
- ${MONGO_CONFIG}
- ${MONGO_VOLUME}
command: mongod --config /etc/mongod.conf
# Redis
redis:
image: ${REDIS_IMAGE}
container_name: ${REDIS_CONTAINER_NAME}
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
volumes:
- ${REDIS_VOLUME}
# Zookeeper
zookeeper:
image: ${ZOOKEEPER_IMAGE}
container_name: ${ZOOKEEPER_CONTAINER_NAME}
environment:
ZOOKEEPER_CLIENT_PORT: ${ZOOKEEPER_CLIENT_PORT}
ZOOKEEPER_TICK_TIME: ${ZOOKEEPER_TICK_TIME}
ports:
- "${ZOOKEEPER_CLIENT_PORT}:${ZOOKEEPER_CLIENT_PORT}"
# Kafka
kafka:
image: ${KAFKA_IMAGE}
container_name: ${KAFKA_CONTAINER_NAME}
depends_on:
- zookeeper
ports:
- "${KAFKA_PORT}:${KAFKA_PORT}"
environment:
KAFKA_BROKER_ID: ${KAFKA_BROKER_ID}
KAFKA_ZOOKEEPER_CONNECT: ${KAFKA_ZOOKEEPER_CONNECT}
KAFKA_ADVERTISED_LISTENERS: ${KAFKA_ADVERTISED_LISTENERS}
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: ${KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR}
volumes:
- ${KAFKA_VOLUME}
networks:
springboot-network:
driver: bridge