-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (53 loc) · 1.18 KB
/
docker-compose.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
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3030:3030"
restart: unless-stopped
depends_on:
- db
environment:
DB_CONN: "root:lotto@tcp(db:3306)/vietlott?charset=utf8mb4&parseTime=True&loc=Local"
db:
image: mysql:latest
#build:
#context: .
#dockerfile: Dockerfile-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: lotto
MYSQL_DATABASE: vietlott
ports:
- "3306:3306"
volumes:
#- ./database/backup-database:/var/lib/mysql
- ./database/vietlott.sql:/docker-entrypoint-initdb.d/dump.sql
prometheus:
image: prom/prometheus
volumes:
- ./prometheus:/etc/prometheus
ports:
- "9090:9090"
restart: unless-stopped
command:
- "--config.file=/etc/prometheus/prometheus.yml"
#- "--storage.tsdb.path=/prometheus"
depends_on:
- app
grafana:
image: grafana/grafana
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_PASSWORD: admin_password
depends_on:
- prometheus
volumes:
mysql_data:
#Docker Networks
# networks:
# app-network:
# driver: bridge