-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (99 loc) · 2.06 KB
/
docker-compose.yml
File metadata and controls
104 lines (99 loc) · 2.06 KB
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
version: '3'
services:
consul:
image: consul
ports:
- 8500:8500
db:
image: postgres:9.3
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 30s
retries: 3
environment:
POSTGRES_DB: otoy
POSTGRES_USER: postgres
POSTGRES_PASSWORD: runwols123
ports:
- 5432:5432
zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
kafka:
image: wurstmeister/kafka:0.10.2.1
depends_on:
- zookeeper
environment:
KAFKA_CREATE_TOPICS: "news-topic:1:3,statuses-topic:1:3,tags-topic:1:1:compact"
KAFKA_ADVERTISED_HOST_NAME: 192.168.99.100
KAFKA_ADVERTISED_PORT: "9092"
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_MESSAGE_MAX_BYTES: 200000000
ports:
- 9092:9092
worker:
build: .
volumes:
- .:/go/src/ntm
working_dir: /go/src/ntm
command: go run main.go --act=consumer
restart: always
environment:
ENV: development
KAFKA_HOST: kafka:9092
DB_DIALECT: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_NAME: otoy
DB_PASSWORD: runwols123
DB_SSLMODE: disable
depends_on:
- consul
- zookeeper
- kafka
- db
links:
- consul
- zookeeper
- kafka
- db
stdin_open: true
tty: true
ntm:
build: .
volumes:
- .:/go/src/ntm
working_dir: /go/src/ntm
command: >
bash -c "go run main.go --act=migrate && go run main.go --act=rest && go run main.go --act=consumer"
restart: always
environment:
ENV: development
KAFKA_HOST: kafka:9092
DB_DIALECT: postgres
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_NAME: otoy
DB_PASSWORD: runwols123
DB_SSLMODE: disable
depends_on:
- consul
- zookeeper
- kafka
- db
- worker
links:
- consul
- zookeeper
- kafka
- db
ports:
- 8080:8080
stdin_open: true
tty: true