forked from ictsc/ictsc-score-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
132 lines (121 loc) · 3.11 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
services:
traefik:
image: traefik:v3.2
container_name: traefik
command:
- --log.level=DEBUG
- --api.insecure=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
api:
labels:
traefik.enable: true
traefik.http.routers.api.entrypoints: web
traefik.http.routers.api.rule: PathPrefix(`/api`)
env_file: .env
build:
context: api/
depends_on:
- db
- redis
ports: ['127.0.0.1:8900:3000']
stdin_open: true
tty: true
volumes:
- './api:/usr/src/app'
command: |
sh -ec '
if [ -f "tmp/pids/server.pid" ]; then
rm tmp/pids/server.pid;
fi
dockerize -wait tcp://redis:6379 -timeout 100s;
dockerize -wait tcp://db:5432 -timeout 100s;
sleep 2;
bundle exec rake db:prepare;
bundle exec rails server -b 0.0.0.0;
'
ui:
labels:
traefik.enable: true
traefik.http.routers.ui.entrypoints: web
traefik.http.routers.ui.rule: PathPrefix(`/`)
env_file: .env
build:
context: ui/
dockerfile: Dockerfile.dev
ports: ['127.0.0.1:8901:3000']
stdin_open: true
tty: true
volumes:
- './ui:/usr/src/app'
command: yarn run dev
db:
image: postgres:11.22-alpine
env_file: .env
volumes:
- 'pgdata:/var/lib/postgresql/data'
stdin_open: true
tty: true
ports: ['127.0.0.1:8902:5432']
command: ['postgres', '-c', 'max_connections=$POSTGRES_MAX_CONNECTIONS', '-c', 'shared_buffers=$POSTGRES_SHARED_BUFFERS', '-c', 'work_mem=$POSTGRES_WORK_MEM']
redis:
image: redis:7.4.1-alpine
env_file: .env
ports: ['127.0.0.1:8903:6379']
push:
labels:
traefik.enable: true
traefik.http.routers.push.entrypoints: web
traefik.http.routers.push.rule: PathPrefix(`/push`)
image: openfresh/plasma:0.2.2
env_file: .env
depends_on:
- redis
ports: ['127.0.0.1:8904:8080']
vmdb-api:
environment:
- DEBUG=1
env_file: .env
build:
context: vmdb-api/
command:
- /server
- --postgres-host=$POSTGRES_HOST
- --postgres-user=$POSTGRES_USER
- --postgres-password=$POSTGRES_PASSWORD
- --postgres-database=$POSTGRES_DB
- --postgres-disable-ssl-mode=true
depends_on:
- db
ports: ['127.0.0.1:8905:8080']
grafana:
image: grafana/grafana:10.4.14
volumes:
- grafana:/var/lib/grafana
ports: ['0.0.0.0:8906:3000']
prometheus:
image: prom/prometheus:v2.55.1
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus:/prometheus
ports: ['0.0.0.0:8907:9090']
exporter:
env_file: .env
build:
context: exporter/
command:
- --postgres-host=$POSTGRES_HOST
- --postgres-user=$POSTGRES_USER
- --postgres-password=$POSTGRES_PASSWORD
- --postgres-database=$POSTGRES_DB
- --postgres-disable-ssl-mode=true
volumes:
pgdata:
grafana:
prometheus: