-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
116 lines (105 loc) · 2.63 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
include:
- ../greptimedb-common.yml
services:
grafana:
build:
context: ./grafana
dockerfile: ./Dockerfile
ports:
- 3000:3000
networks:
- demo-network
user: "$UID:$GID"
volumes:
- ./grafana_provisioning:/etc/grafana/provisioning
depends_on:
greptimedb:
condition: service_healthy
restart: always
init_database:
image: docker.io/postgres:17
networks:
- demo-network
depends_on:
greptimedb:
condition: service_healthy
volumes:
- ./config_data:/config_data
command: psql -h greptimedb -p 4003 -d public -f /config_data/init_database.sql
environment:
PGSSLMODE: disable
init: yes
init_pipeline:
image: docker.io/alpine/curl
networks:
- demo-network
depends_on:
init_database:
condition: service_completed_successfully
volumes:
- ./config_data:/config_data
command: sh -c "sleep 20 && curl -X 'POST' 'http://greptimedb:4000/v1/events/pipelines/demo_pipeline' -F 'file=@/config_data/greptime_pipeline.yaml' -v; curl -X 'POST' 'http://greptimedb:4000/v1/events/pipelines/server_log' -F 'file=@/config_data/server_log_pipeline.yaml' -v"
init: yes
vector:
image: docker.io/timberio/vector:0.41.X-alpine
networks:
- demo-network
command: "-c /config_data/vector.toml"
volumes:
- ./config_data:/config_data
- logs:/logs
nginx:
image: docker.io/nginx:1.27.0
networks:
- demo-network
volumes:
- ./nginx_conf/nginx.conf:/etc/nginx/nginx.conf
- logs:/var/log/nginx
environment:
- NGINX_PORT=8081
depends_on:
server:
condition: service_healthy
server:
build:
context: ./server
dockerfile: ./Dockerfile
networks:
- demo-network
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:5678/" ]
interval: 3s
timeout: 3s
retries: 5
py-client:
build:
context: ./client
dockerfile: ./Dockerfile
networks:
- demo-network
depends_on:
nginx:
condition: service_started
prometheus:
image: docker.io/prom/prometheus:v2.45.6
networks:
- demo-network
volumes:
- ./config_data/prometheus-greptimedb.yml:/etc/prometheus/prometheus.yml:ro
nginx_exporter:
image: docker.io/nginx/nginx-prometheus-exporter:1.1
ports:
- 9113
command:
- '--nginx.scrape-uri=http://nginx/nginx_status'
networks:
- demo-network
depends_on:
greptimedb:
condition: service_healthy
nginx:
condition: service_started
networks:
demo-network:
volumes:
logs: