forked from ictsc/ictsc-score-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
141 lines (128 loc) · 3.27 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
133
134
135
136
137
138
139
140
141
version: '3'
services:
traefik:
image: traefik:v2.10
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/
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.3-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:5.0.4-alpine
env_file: .env
ports: ['127.0.0.1:8903:6379']
yamllint:
build:
context: yamllint/
volumes:
- './:/usr/src/app'
command: echo "yamllint is disabled"
# command: yamllint -c /usr/src/app/.yamllint /usr/src/app
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.2.3
volumes:
- grafana:/var/lib/grafana
ports: ['0.0.0.0:8906:3000']
prometheus:
image: prom/prometheus:v2.48.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: