-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
112 lines (104 loc) · 3.4 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
version: '3'
services:
redpanda:
hostname: redpanda
command:
- redpanda
- start
- --kafka-addr internal://0.0.0.0:9092,external://0.0.0.0:19092
# Address the broker advertises to clients that connect to the Kafka API.
# Use the internal addresses to connect to the Redpanda brokers'
# from inside the same Docker network.
# Use the external addresses to connect to the Redpanda brokers'
# from outside the Docker network.
- --advertise-kafka-addr internal://redpanda:9092,external://localhost:19092
- --pandaproxy-addr internal://0.0.0.0:8082,external://0.0.0.0:18082
# Address the broker advertises to clients that connect to the HTTP Proxy.
- --advertise-pandaproxy-addr internal://redpanda:8082,external://localhost:18082
- --schema-registry-addr internal://0.0.0.0:8081,external://0.0.0.0:18081
# Redpanda brokers use the RPC API to communicate with each other internally.
- --rpc-addr redpanda:33145
- --advertise-rpc-addr redpanda:33145
# Mode dev-container uses well-known configuration properties for development in containers.
- --mode dev-container
# Tells Seastar (the framework Redpanda uses under the hood) to use 1 core on the system.
- --smp 1
- --default-log-level=info
image: docker.redpanda.com/redpandadata/redpanda:v23.3.7
container_name: redpanda
ports:
- 18081:18081
- 18082:18082
- 19092:19092
- 19644:9644
# console:
# container_name: redpanda-console
# image: docker.redpanda.com/redpandadata/console:v2.4.5
# entrypoint: /bin/sh
# command: -c 'echo "$$CONSOLE_CONFIG_FILE" > /tmp/config.yml; /app/console'
# environment:
# CONFIG_FILEPATH: /tmp/config.yml
# CONSOLE_CONFIG_FILE: |
# kafka:
# brokers: ["redpanda:9092"]
# schemaRegistry:
# enabled: true
# urls: ["http://redpanda:8081"]
# redpanda:
# adminApi:
# enabled: true
# urls: ["http://redpanda:9644"]
# ports:
# - 8080:8080
# depends_on:
# - redpanda
scylladb:
hostname: scylladb
container_name: scylladb
image: scylladb/scylla:5.4.3
ports:
- "9042:9042"
healthcheck:
test: ["CMD-SHELL", "sh -c $(curl -s -X GET --header 'Accept: application/json' 'http://localhost:10000/storage_service/native_transport')"]
interval: 30s
timeout: 10s
retries: 5
backend:
hostname: backend
container_name: backend
image: backend:v1
build:
context: ./backend
dockerfile: backend.dockerfile
environment:
- SCYLLA_URL=scylladb:9042
- REDPANDA_URL=redpanda:9092
ports:
- "3001:3001"
depends_on:
scylladb:
condition: service_healthy
consumer:
hostname: consumer
container_name: consumer
image: consumer:v1
build:
context: ./consumer
dockerfile: consumer.dockerfile
environment:
- SCYLLA_URL=scylladb:9042
- REDPANDA_URL=redpanda:9092
depends_on:
scylladb:
condition: service_healthy
frontend:
hostname: frontend
container_name: frontend
image: frontend:v1
build:
context: ./frontend
dockerfile: frontend.dockerfile
environment:
- BACKEND_URL=backend:3001
ports:
- "3000:3000"