-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (53 loc) · 1.25 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
version: '2' #docker-compose 버전 지정
services:
zookeeper:
# 사용할 이미지
image: wurstmeister/zookeeper
# 컨테이너명 설정
container_name: zookeeper
# 접근 포트 설정 (컨테이너 외부:컨테이너 내부)
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_CREATE_TOPICS: "Topic:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# 볼륨 설정
volumes:
- /var/run/docker.sock
# 의존 관계 설정
depends_on:
- zookeeper
postgres:
image: postgres:latest
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_DB: hellordb
POSTGRES_USER: hellotoday
POSTGRES_PASSWORD: 1016
mongo:
image: mongo:latest
container_name: mongo
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: hellomongo
MONGO_INITDB_ROOT_PASSWORD: 1016
MONGO_INITDB_DATABASE: hellonosql
volumes:
- mongodb_data:/data/db
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf:ro"
volumes:
mongodb_data: