-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
134 lines (123 loc) · 3.57 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
127
128
129
130
131
132
133
134
# Before running Nginx, this command writes a
# configuration file suitable for single-page applications.
x-nginx-command: &nginx-command |
bash -c 'bash -s <<EOF
cat > /etc/nginx/conf.d/default.conf <<EON
server {
listen 80 default_server;
root /usr/share/nginx/html;
location / {
# configure Nginx to work for client side routing
try_files \\\$$uri \\\$$uri/ /index.html;
}
}
EON
nginx -g "daemon off;"
EOF'
# global project name
name: modelix-samples
services:
model-server-empty:
# Keep the version in sync with the modelix version in gradle/libs.versions.toml
image: modelix/model-server:9.1.1
container_name: ${COMPOSE_PROJECT_NAME}-model-server-empty
profiles:
- useCase1
ports:
- 28101:28101
command: ["-inmemory"]
model-server:
# Keep the version in sync with the modelix version in gradle/libs.versions.toml
image: modelix/model-server:9.1.1
container_name: ${COMPOSE_PROJECT_NAME}-model-server
profiles:
- useCase2
- useCase3
- monitoring
- all
# - useCase3b
ports:
- 28101:28101
volumes:
- ./model-server/courses.modelserver.dump:/courses.modelserver.dump
command: ["-inmemory", "-dumpin", "/courses.modelserver.dump" ]
rest-api-model-server:
image: modelix/rest-api-model-server:latest
container_name: ${COMPOSE_PROJECT_NAME}-rest-api-model-server
# Needs to be specified, so that container runs in Docker on Mac with ARM
platform: linux/x86_64
profiles:
- useCase3
- all
ports:
# The dashboard expects our service to be running under 8090.
- 8090:8080
environment:
- MODELIX_CLIENT_SERVER_URI=http://model-server:28101
spa-dashboard-angular:
container_name: ${COMPOSE_PROJECT_NAME}-spa-dashboard-angular
image: nginx
ports:
- 4201:80
profiles:
- useCase3
- all
# - useCase3b
volumes:
- ./spa-dashboard-angular/dist:/usr/share/nginx/html
command: *nginx-command
spa-overview-angular:
image: nginx
container_name: ${COMPOSE_PROJECT_NAME}-spa-overview-angular
profiles:
- useCase2
- all
ports:
- 4200:80
volumes:
- ./spa-overview-angular/dist/spa-overview-angular:/usr/share/nginx/html
command: *nginx-command
spa-management-vue:
image: nginx
container_name: ${COMPOSE_PROJECT_NAME}-spa-management-vue
profiles:
- useCase2
- all
ports:
- 3000:80
volumes:
- ./spa-management-vue/dist:/usr/share/nginx/html
command: *nginx-command
prometheus:
image: prom/prometheus
container_name: ${COMPOSE_PROJECT_NAME}-prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
profiles:
- monitoring
- all
restart: unless-stopped
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prom_data:/prometheus
grafana:
image: grafana/grafana-oss
container_name: ${COMPOSE_PROJECT_NAME}-grafana
ports:
- 3001:3000
profiles:
- monitoring
- all
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/model-server-dashboard.json
volumes:
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources/
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards/
volumes:
prom_data: