-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
83 lines (77 loc) · 1.74 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
version: "3"
services:
server:
build:
context: .
dockerfile: Dockerfile
environment:
- DATABASE_URL=postgres://admin:admin@postgresql:5432/exchange?sslmode=disable
- GRPC_ADDRESS=localhost:8081
ports:
- "8080:8080"
- "8081:8081"
networks:
- loki
depends_on:
postgresql:
condition: service_healthy
postgresql:
image: "postgres:alpine"
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=exchange
ports:
- "5432:5432"
networks:
- loki
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "exchange", "-U", "admin"]
interval: 30s
timeout: 60s
retries: 5
loki:
image: grafana/loki:2.9.2
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
networks:
- loki
promtail:
image: grafana/promtail:2.9.2
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
networks:
- loki
grafana:
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
entrypoint:
- sh
- -euc
- |
mkdir -p /etc/grafana/provisioning/datasources
cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
orgId: 1
url: http://loki:3100
basicAuth: false
isDefault: true
version: 1
editable: false
EOF
/run.sh
image: grafana/grafana:latest
ports:
- "3000:3000"
networks:
- loki
networks:
loki: