-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
72 lines (64 loc) · 1.48 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
version: "3"
services:
db:
restart: always
image: postgres:11
container_name: postgresql
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: 1234
POSTGRES_USER: postgres
POSTGRES_DB: microservicos
command:
- "postgres"
- "-c"
- "listen_addresses=*"
- "-c"
- "port=5432"
master:
build:
"./"
container_name: master
working_dir: /go/src/app
command: go run main.go
ports:
- "2112:2112"
volumes:
- ./:/go/src/app
depends_on:
- db
rabbitmq:
restart: always
image: rabbitmq:management
ports:
- "5672:5672"
- "15672:15672"
depends_on:
- master
slave1:
build:
"./worker/"
container_name: slave1
working_dir: /go/src/app
command: go run worker.go
ports:
- "2113:2113"
volumes:
- ./worker/:/go/src/app
depends_on:
- master
- rabbitmq
slave2:
build:
"./worker/"
container_name: slave2
working_dir: /go/src/app
command: go run worker.go
ports:
- "2114:2114"
volumes:
- ./worker/:/go/src/app
depends_on:
- master
- rabbitmq