forked from koddr/tutorial-go-fiber-rabbitmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
126 lines (115 loc) · 2.7 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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: "3.9"
services:
# Create service with RabbitMQ.
message-broker:
image: rabbitmq:3-management-alpine
container_name: message-broker
ports:
- 5672:5672 # for sender and consumer connections
- 15672:15672 # for serve RabbitMQ GUI
volumes:
- ${HOME}/dev-rabbitmq/data/:/var/lib/rabbitmq
- ${HOME}/dev-rabbitmq/log/:/var/log/rabbitmq
restart: always
networks:
- dev-network
# Create service with Fiber sender.
sender:
container_name: sender
ports:
- 3000:3000
build:
context: .
dockerfile: Dockerfile-sender
environment:
AMQP_SERVER_URL: amqp://guest:guest@message-broker:5672/
restart: always
networks:
- dev-network
depends_on:
- message-broker
# Create service with message consumer.
consumer:
container_name: consumer
build:
context: .
dockerfile: Dockerfile-consumer
environment:
AMQP_SERVER_URL: amqp://guest:guest@message-broker:5672/
restart: always
networks:
- dev-network
depends_on:
- sender
- message-broker
# Create Postgres DB Service
db:
container_name: postgres
image: postgres:9.4
restart: always
tty: true
volumes:
- ../.pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_DB=kinoshita
- POSTGRES_PASSWORD=123456
ports:
- "5432:5432"
extra_hosts:
- "host.docker.internal:172.17.0.1"
networks:
- dev-network
# Create Postgres admin service
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
tty: true
environment:
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "9000:80"
depends_on:
- db
extra_hosts:
- "host.docker.internal:172.17.0.1"
networks:
- dev-network
# Create ELK services
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.4
container_name: es01
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
ports:
- 9200:9200
extra_hosts:
- "host.docker.internal:172.17.0.1"
networks:
- dev-network
kibana:
image: docker.elastic.co/kibana/kibana:7.13.4
container_name: kib01
ports:
- 5601:5601
environment:
ELASTICSEARCH_URL: http://es01:9200
ELASTICSEARCH_HOSTS: '["http://es01:9200"]'
extra_hosts:
- "host.docker.internal:172.17.0.1"
networks:
- dev-network
volumes:
data01:
driver: local
networks:
# Create a new Docker network.
dev-network:
driver: bridge