-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (79 loc) · 1.5 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
version: "3.3"
services:
goapi:
build: "."
ports:
- "8080:8080"
expose:
- "8080"
depends_on:
- mysql
- redis
# - rabbitmq
links:
- mysql
- redis
# - rabbitmq
networks:
- go_app
mysql:
image: mysql:8.0
container_name: mysql
hostname: mysql
environment:
- MYSQL_DATABASE=go_api
- MYSQL_ROOT_PASSWORD=root
- MYSQL_PASSWORD=user
- MYSQL_PASSWORD=root
ports:
- 3306:3306
volumes:
- '~/.docker/data/mysql:/var/lib/mysql'
networks:
- go_app
elasticsearch:
image: elasticsearch:7.7.0
container_name: elasticsearch
hostname: elasticsearch
environment:
- "discovery.type=single-node"
ports:
- 9200:9200
- 9300:9300
networks:
- go_app
redis:
image: redis:alpine
container_name: redis
privileged: true
ports:
- 6379:6379
volumes:
- ~/.docker/data/redis:/data
networks:
- go_app
mongodb:
image: mongo
container_name: mongodb
hostname: mongo
ports:
- 27017:27017
networks:
- go_app
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
# hostname: rabbitmq
ports:
# Management port
- "15672:15672"
# Service port
- "5672:5672"
expose:
- "15672"
- "5672"
networks:
- go_app
networks:
go_app:
driver: bridge