-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
93 lines (86 loc) · 2.22 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
services:
app:
container_name: go-boilerplate-app
build:
context: .
dockerfile: Dockerfile
ports:
- 5000:5000
environment:
WAIT_HOSTS: db:3306
WAIT_HOSTS_TIMEOUT: 60
volumes:
- ./:/app #use this volume to set the live reload
depends_on:
- db
- cache
networks:
- app-network
cache:
container_name: go-boilerplate-cache-redis
image: redis:7.4-alpine
restart: unless-stopped
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- ./.docker/volumes/cachedata:/data
networks:
- app-network
db:
container_name: go-boilerplate-mysql
image: mysql:8.0.32
command: bash -c "usermod -u 1000 mysql && docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin"
cap_add:
- SYS_NICE # CAP_SYS_NICE - this is to not show the error 'mbind: Operation not permitted' in database docker log
restart: unless-stopped
tty: true
ports:
- 3306:3306
volumes:
- ./.docker/volumes/dbdata:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=go_boilerplate_db
- MYSQL_USER=user
- MYSQL_PASSWORD=root
networks:
- app-network
prometheus:
image: prom/prometheus
container_name: go-boilerplate-prometheus
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
networks:
- app-network
grafana:
# to configure host on grafana inside datasource, we can use the container name, for example: http://prometheus:9090
image: grafana/grafana
ports:
- "3000:3000"
container_name: go-boilerplate-grafana
depends_on:
- prometheus
networks:
- app-network
jaeger:
image: jaegertracing/all-in-one:latest
environment:
- COLLECTOR_ZIPKIN_HTTP_PORT=9411
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 14268:14268
- 9411:9411
networks:
- app-network
networks:
app-network:
driver: bridge