forked from grizz622/TcloudServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (67 loc) · 1.62 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
# 启动kong前需要先migrations一下: docker-compose run kong kong migrations bootstrap
# kong的token是Bearer {{token}}的,可以编辑kong的lua脚本来修改
version: '3.5'
services:
kong:
image: kong:latest
restart: always
container_name: kong
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: kong_database
KONG_CASSANDRA_CONTACT_POINTS: kong_database
KONG_ADMIN_LISTEN: 0.0.0.0:8001
KONG_ADMIN_LISTEN_SSL: 0.0.0.0:8444
volumes:
- ./volumes/logs:/usr/local/kong/logs
ports:
- 80:8000
links:
- kong_database
healthcheck:
test: ["CMD", "curl", "-f", "http://kong:8001"]
interval: 5s
timeout: 2s
retries: 15
kong_database:
image: postgres:9.5
container_name: kong_database
restart: always
environment:
POSTGRES_USER: kong
POSTGRES_DB: kong
volumes:
- ./volumes/kong_database:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 5s
timeout: 5s
retries: 5
konga:
image: pantsel/konga
container_name: konga
restart: always
ports:
- 9000:1337
environment:
- DB_ADAPTER=postgres
- DB_HOST=kong_database
- DB_USER=kong
prometheus:
image: prom/prometheus
restart: always
container_name: prometheus
ports:
- 9001:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
restart: always
container_name: grafana
ports:
- 9002:3000
networks:
default:
name: tcloud_kong
driver: bridge