-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
94 lines (88 loc) · 2.29 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
version: '3.1'
name: opsway
services:
# Application
api:
image: acim/go-reflex
restart: unless-stopped
command: reflex -r '\.go|\.yaml$' -R '\.data\/' -s -- sh -c 'go run main.go api --config config.compose.yaml'
environment:
- RACE_DETECTOR=1
volumes:
- .:/app
ports:
- 8001:8001
depends_on:
- postgres
- redis
- ch_server
- storage
prober:
image: acim/go-reflex
restart: unless-stopped
command: reflex -r '\.go|\.yaml$' -R '\.data\/' -s -- sh -c 'go run main.go prober --config config.compose.yaml'
environment:
- RACE_DETECTOR=1
volumes:
- .:/app
depends_on:
- redis
- ch_server
# Dependencies
postgres:
image: 'postgres:14.4-alpine'
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pass
POSTGRES_DB: opsway
volumes:
- './.data/postgres:/var/lib/posgresql/data'
ports:
- '5432:5432'
redis:
image: 'redis/redis-stack:latest'
restart: unless-stopped
ports:
- '6379:6379'
- '8002:8001'
ch_server:
image: clickhouse/clickhouse-server
restart: unless-stopped
environment:
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=
- CLICKHOUSE_DB=opsway
ports:
- '8123:8123'
- '9000:9000'
volumes:
- './.data/clickhouse:/var/lib/clickhouse'
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8123/?query=SELECT%201 || exit 1
ch_client:
image: clickhouse/clickhouse-client
restart: unless-stopped
entrypoint:
- /bin/sleep
command:
- infinity
storage:
image: minio/minio
restart: unless-stopped
ports:
- '9001:9001'
- '5566:5566'
volumes:
- './.data/minio:/data'
environment:
MINIO_ACCESS_KEY: guest
MINIO_SECRET_KEY: supersecret
command: 'server --address 0.0.0.0:9001 --console-address 0.0.0.0:5566 /data'
storage_init:
image: minio/mc:latest
depends_on:
- storage
entrypoint: >
/bin/sh -c " /usr/bin/mc config host rm local; /usr/bin/mc config host add --quiet --api s3v4 local http://storage:9001 guest supersecret;
/usr/bin/mc mb --quiet local/avatars/; /usr/bin/mc anonymous set download local/avatars; "