-
Notifications
You must be signed in to change notification settings - Fork 2
/
monolith-compose.yml
86 lines (84 loc) · 2.15 KB
/
monolith-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
version: '3.8'
services:
lookup:
container_name: lookup
image: madflojo/tarmac:unstable
ports:
- 80:8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/ready"]
interval: 10s
timeout: 5s
retries: 3
environment:
- "APP_ENABLE_TLS=false"
- "APP_LISTEN_ADDR=0.0.0.0:8080"
- "APP_DEBUG=false"
- "APP_TRACE=false"
- "APP_WASM_FUNCTION_CONFIG=/config/tarmac-monolith.json"
- "APP_ENABLE_SQL=true"
- "APP_SQL_TYPE=mysql"
- "APP_SQL_DSN=root:example@tcp(mysql:3306)/example"
- "APP_ENABLE_KVSTORE=true"
- "APP_KVSTORE_TYPE=redis"
- "APP_REDIS_SERVER=redis:6379"
volumes:
- "./config:/config"
- "./functions/build:/functions"
depends_on:
- mysql
- redis
- grafana
# Dependencies
mysql:
container_name: mysql
image: bitnami/mysql:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 3
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: example
ports:
- 3306:3306
redis:
container_name: redis
image: bitnami/redis:latest
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
environment:
- ALLOW_EMPTY_PASSWORD=yes
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/config/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ./config:/config
- prom_data:/prometheus
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_PASSWORD=example
volumes:
- ./config/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./config/grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml
- ./config/grafana/dashboards:/var/lib/grafana/dashboards
depends_on:
- prometheus
volumes:
prom_data: