-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
196 lines (194 loc) · 5.75 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
version: "3"
services:
##### ===================================================================================================
nginx:
image: docker.hoopoe.app/nginx
container_name: nginx
build:
context: ./
dockerfile: ./infra/docker/nginx/Dockerfile
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./infra/data/nginx/confs:/etc/nginx:ro
- ./infra/data/nginx/wwws:/usr/share/nginx
- ./assets:/etc/nginx/assets:ro
- ./infra/logs:/etc/nginx/logs:rw
networks:
- host
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
##### ===================================================================================================
redis:
container_name: redis
image: docker.hoopoe.app/redis:latest
restart: always
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
volumes:
- ./infra/data/redis:/data
ports:
- "6379:6379"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
hostname: redis
command: ["redis-server", "--appendonly", "yes", "--requirepass", "${REDIS_PASSWORD}"]
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
##### ===================================================================================================
grafana:
container_name: grafana
image: docker.hoopoe.app/grafana/grafana
restart: always
volumes:
- /infra/data:/var/lib/grafana
ports:
- "7050:3000"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
user: "$(id -u)"
##### ===================================================================================================
portainer:
container_name: portainer
image: docker.hoopoe.app/portainer/portainer-ce
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./infra/data/portainer_data:/data
ports:
- "8000:8000"
- "9443:9443"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
##### ===================================================================================================
timescaledb:
container_name: postgres
image: docker.hoopoe.app/timescale/timescaledb-ha
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGDATA=${PGDATA}
- POSTGRES_DB=${DB_NAME}
volumes:
- ./infra/data/timescaledb:/home/postgres/pgdata/data
ports:
- "127.0.0.1:5433:5432" # this local binding only avoid the container eating cpu constantly due having kinsing virus in this timescaledb container
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
healthcheck:
test: ["CMD", "pg_isready", "-h", "localhost", "-U", "$POSTGRES_USER", "-d", "postgres"]
interval: 10s
timeout: 5s
retries: 3
##### ===================================================================================================
rabbitmq:
container_name: rabbitmq
image: docker.hoopoe.app/rabbitmq
restart: unless-stopped
environment:
- RABBITMQ_DEFAULT_USER=${AMQP_USERNAME}
- RABBITMQ_DEFAULT_PASS=${AMQP_PASSWORD}
ports:
- "5672:5672"
- "15672:15672"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
hostname: rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
##### ===================================================================================================
kafka:
image: apache/kafka:latest
container_name: kafka
restart: unless-stopped
ports:
- "9092:9092"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
hostname: kafka
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://localhost:9092,CONTROLLER://localhost:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_NUM_PARTITIONS: 3
##### ===================================================================================================
adminer:
container_name: adminer
image: docker.hoopoe.app/adminer
restart: unless-stopped
links:
- timescaledb
depends_on:
- timescaledb
ports:
- "7543:8080"
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
##### ===================================================================================================
hoopoe-http:
container_name: hoopoe-http
image: docker.hoopoe.app/hoopoe-http # the tag name would be the same as image name
build:
context: ./
dockerfile: ./infra/docker/hoopoe-http/Dockerfile
restart: unless-stopped
links:
- timescaledb
depends_on:
- timescaledb
- redis
ports:
- "2345:2344"
volumes:
- ./assets:/app/assets:ro
- ./infra/logs:/app/logs:rw
networks:
- hoopoe
- hoopoe_is_there1
- hoopoe_is_there2
networks:
hoopoe:
host:
bridge:
hoopoe_is_there1: external:true
hoopoe_is_there2: external:true