-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
126 lines (122 loc) · 2.7 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
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:
db:
image: mysql:8.0
command: --init-file /data/application/init.sql
ports:
- 33063:3306
volumes:
- dbdata:/var/lib/mysql
- ./init.sql:/data/application/init.sql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_USER: dbuser
MYSQL_PASSWORD: secret
healthcheck:
test:
[
"CMD",
"mysql",
"-u",
"root",
"-psecret",
"--silent",
"--execute",
"SELECT 1;",
]
interval: 30s
timeout: 10s
retries: 5
networks:
- app
scanner:
depends_on:
db:
condition: service_healthy
image: registry-scanner:latest
volumes:
- scanner-cache:/scanner-cache
environment:
SCAN_INTERVAL_MINUTES: 15
CACHE_DIR: /scanner-cache
REGISTRIES_TO_SCAN: |
[registries]
[registries.general]
owner = "JuliaRegistries"
name = "General"
base_ref_name = "master"
secret = "github_token"
DB_HOST: db
DB_USER: root
DB_PASS: secret
DB_PORT: 3306
DB_DATABASE: main
networks:
- app
secrets:
- github_token
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
scanner-ui:
depends_on:
db:
condition: service_healthy
image: registry-scanner-ui:latest
environment:
DB_HOST: db
DB_USER: root
DB_PASS: secret
DB_PORT: 3306
DB_DATABASE: main
TZ: America/New_York # which timezone the data is displayed in
networks:
- app
ports:
- 4000:3000
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
grafana:
image: grafana/grafana-oss:latest
volumes:
- grafana-storage:/var/lib/grafana
- ./datasources:/etc/grafana/provisioning/datasources
- ./dashboards:/etc/grafana/provisioning/dashboards
- ./alerting:/etc/grafana/provisioning/alerting
- ./dashboard_files:/var/lib/grafana/dashboards
ports:
- 3000:3000
environment:
MYSQL_USER: root
MYSQL_PASSWORD: secret
MYSQL_DATABASE: main
MYSQL_HOST: db
MYSQL_PORT: 3306
LOKI_HOST: loki
LOKI_PORT: 3100
networks:
- app
loki:
image: grafana/loki:2.7.4
volumes:
- ./loki-config.yaml:/mnt/config/loki-config.yaml
- loki-storage:/loki
command: -config.file=/mnt/config/loki-config.yaml
ports:
- 3100:3100
networks:
- app
secrets:
github_token:
file: ./github_token.txt
networks:
app:
driver: bridge
volumes:
dbdata:
scanner-cache:
grafana-storage:
loki-storage: