-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
119 lines (110 loc) · 2.98 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
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
version: '3'
services:
api:
build:
context: .
dockerfile: Dockerfile
env_file: .env
container_name: api
healthcheck:
test: ['CMD-SHELL', 'curl', '--fail', 'http://localhost:${PORT}/health-check']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
ports:
- '${PORT}:${PORT}'
depends_on:
- db
- redis
- meilisearch
- kafka
redis:
image: bitnami/redis@sha256:76d250e94bd9d9315a807e8a45adc48091927802d54110187cbaee98a59bc4f1
env_file: .env
container_name: redis
restart: unless-stopped
ports:
- '${REDIS_PORT}:6379'
volumes:
- 'redis_data:/bitnami/redis/data'
db:
image: postgres:14-alpine
env_file: .env
container_name: db
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- '${DB_PORT}:5432'
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
worker:
build:
context: .
dockerfile: Dockerfile
env_file: .env
container_name: worker
restart: unless-stopped
depends_on:
- db
- redis
command: ['/bin/bash', '-c', 'node ./dist/worker.js']
meilisearch:
image: getmeili/meilisearch:latest
env_file: .env
container_name: meilisearch
restart: unless-stopped
ports:
- '7700:7700'
volumes:
- 'meili_data:/meili_data'
zookeeper:
image: bitnami/zookeeper@sha256:bf2901d64cde446ecfca6aa4fd03a4451609e596179d60eb6a015155bbab905c
ports:
- '7777:7777'
volumes:
- zookeeperData:/bitnami/zookeeper
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_PORT_NUMBER=7777
kafka:
image: bitnami/kafka@sha256:774c9bf466b4f51223bb7117c921153b5fcaa0daf82c69d1c89c9ebaf1b35e34
ports:
- "9093:9093"
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:7777
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_CFG_DELETE_TOPIC_ENABLE: 'true'
KAFKA_CFG_CREATE_TOPICS: "topic-test:1:1"
ALLOW_ANONYMOUS_LOGIN: "yes"
KAFKA_BROKER_ID: 1
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_CFG_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://kafka:9093
KAFKA_CFG_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://localhost:9093
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: INTERNAL
volumes:
- kafkaData:/bitnami/kafka
schema-registry:
image: confluentinc/cp-schema-registry:latest@sha256:e7a7c0b2d71f140467517094636357986a49586b12ce56919c67fc391145f929
ports:
- '8081:8081'
depends_on:
- zookeeper
- kafka
environment:
SCHEMA_REGISTRY_DEBUG: "true"
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:9092
SCHEMA_REGISTRY_HOST_NAME: schema-registry
volumes:
pgdata:
redis_data:
meili_data:
schemaRegistryData:
kafkaData:
zookeeperData: