-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
127 lines (119 loc) · 3.99 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
version: "3.4"
services:
# Web Entrypoint
traefik:
image: docker.io/library/traefik:2.5
command:
- "--api.dashboard=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.postgres.address=:5432"
- "--entrypoints.redis.address=:6379"
- "--entrypoints.clickhouse.address=:9000"
- "--providers.docker"
labels:
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.rule=Host(`traefik.docker.localhost`)"
- "traefik.http.routers.traefik.service=api@internal"
ports:
- "80:80"
- "5432:5432"
- "6379:6379"
- "9000:9000"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
default:
aliases:
- "api.docker.localhost"
- "clickhouse.docker.localhost"
- "minio.docker.localhost"
- "minio-console.docker.localhost"
- "postgres.docker.localhost"
- "redis.docker.localhost"
# Control-Plane & Data-Plane
clickhouse:
image: docker.io/clickhouse/clickhouse-server:22.8
labels:
# ClickHouse HTTP (8123)
- traefik.http.routers.clickhouse-http.entrypoints=web
- traefik.http.routers.clickhouse-http.rule=Host(`clickhouse.docker.localhost`)
- traefik.http.routers.clickhouse-http.service=clickhouse-http
- traefik.http.services.clickhouse-http.loadbalancer.server.port=8123
# ClickHouse Native (9000)
- traefik.tcp.routers.clickhouse-tcp.entrypoints=clickhouse
- traefik.tcp.routers.clickhouse-tcp.rule=HostSNI(`*`)
- traefik.tcp.routers.clickhouse-tcp.service=clickhouse-tcp
- traefik.tcp.services.clickhouse-tcp.loadbalancer.server.port=9000
volumes:
- "./configuration/clickhouse/users.d:/etc/clickhouse-server/users.d:ro"
- "./configuration/clickhouse/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh"
postgres:
image: postgres:16.1
environment:
POSTGRES_USER: iris
POSTGRES_PASSWORD: iris
labels:
- traefik.tcp.routers.postgres.entrypoints=postgres
- traefik.tcp.routers.postgres.rule=HostSNI(`*`)
- traefik.tcp.routers.postgres.service=postgres
- traefik.tcp.services.postgres.loadbalancer.server.port=5432
redis:
image: docker.io/library/redis:6
command: "redis-server --requirepass iris"
labels:
- "traefik.tcp.routers.redis.entrypoints=redis"
- "traefik.tcp.routers.redis.rule=HostSNI(`*`)"
minio:
image: docker.io/minio/minio:RELEASE.2023-08-31T15-31-16Z
command: "server /data --console-address :9001"
labels:
# API
- "traefik.http.routers.minio.entrypoints=web"
- "traefik.http.routers.minio.rule=Host(`minio.docker.localhost`)"
- "traefik.http.routers.minio.service=minio"
- "traefik.http.services.minio.loadbalancer.server.port=9000"
# Console
- "traefik.http.routers.minio-console.entrypoints=web"
- "traefik.http.routers.minio-console.rule=Host(`minio-console.docker.localhost`)"
- "traefik.http.routers.minio-console.service=minio-console"
- "traefik.http.services.minio-console.loadbalancer.server.port=9001"
# Iris
agent:
build:
context: .
dockerfile: "./dockerfiles/iris-agent.dockerfile"
environment:
AGENT_CARACAL_INTEGRITY_CHECK: "false" # In order to test from Docker for Mac
volumes:
- "./iris:/app/iris:ro"
depends_on:
- minio
- redis
- traefik
api:
build:
context: .
dockerfile: "./dockerfiles/iris-api.dockerfile"
labels:
- "traefik.http.routers.api.entrypoints=web"
- "traefik.http.routers.api.rule=Host(`api.docker.localhost`)"
volumes:
- "./iris:/app/iris:ro"
depends_on:
- clickhouse
- minio
- postgres
- redis
- traefik
worker:
build:
context: .
dockerfile: "./dockerfiles/iris-worker.dockerfile"
volumes:
- "./iris:/app/iris:ro"
depends_on:
- clickhouse
- minio
- postgres
- redis
- traefik