-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yaml
100 lines (94 loc) · 2.21 KB
/
docker-compose-dev.yaml
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
services:
gin_blog:
image: gin-blog:v1.2.0
container_name: gin_blog
ports:
- "5678:5678"
volumes:
- gin_blog_logs:/logs
depends_on:
- mysql
- redis
networks:
- gin-blog
mysql:
image: mysql:8.0.36
container_name: mysql_server
environment:
MYSQL_ROOT_PASSWORD: admin123456
MYSQL_DATABASE: blog
MYSQL_USER: admin
MYSQL_PASSWORD: admin123456
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql:/var/lib/mysql
- ./database/init.sql:/docker-entrypoint-initdb.d/init_script.sql
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 30s
timeout: 10s
retries: 3
restart: always
networks:
- gin-blog
redis:
image: redis:6.2.6
container_name: redis_server
command: redis-server --appendonly yes --requirepass sumingcheng
ports:
- "6379:6379"
volumes:
- redis:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
restart: always
networks:
- gin-blog
prometheus:
image: prom/prometheus:v2.53.0
container_name: prometheus
volumes:
- ./deploy/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
ports:
- "59090:9090"
networks:
- gin-blog
restart: unless-stopped
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
depends_on:
- gin_blog
grafana:
image: grafana/grafana:10.4.4
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./deploy/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./deploy/grafana/provisioning:/etc/grafana/provisioning
environment:
GF_SECURITY_ADMIN_PASSWORD: admin123456
GF_USERS_ALLOW_SIGN_UP: "false"
ports:
- "53000:3000"
networks:
- gin-blog
restart: unless-stopped
depends_on:
- prometheus
volumes:
mysql:
redis:
gin_blog_logs:
prometheus_data:
grafana_data:
networks:
gin-blog:
driver: bridge