forked from futo-org/polycentric
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
107 lines (101 loc) · 3.22 KB
/
Copy pathcompose.yml
File metadata and controls
107 lines (101 loc) · 3.22 KB
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
services:
postgres:
image: postgres:18
environment:
POSTGRES_PASSWORD: testing
volumes:
- postgres-data:/var/lib/postgresql/18/docker
ports:
- 5432:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d postgres || exit 1']
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
server:
build:
context: .
dockerfile: services/server/Dockerfile
ports:
- ${POLYCENTRIC_SERVER_PORT:-3000}:3000
environment:
- RUST_LOG=debug
- DATABASE_URL=postgres://postgres:testing@postgres:5432
- CONTENT_BLOB_OS_BUCKET=polycentric-blobs
- CONTENT_BLOB_OS_ENDPOINT=http://rustfs:9000
- CONTENT_BLOB_OS_FORCE_PATH_STYLE=true
- CONTENT_BLOB_OS_ACCESS_KEY=rustfsadmin
- CONTENT_BLOB_OS_SECRET_KEY=rustfsadmin
# In-network listener: the default (localhost:9092) points at the server
# container itself, making Kafka unreachable
- POLYCENTRIC_KAFKA_BROKERS=kafka:19092
depends_on:
postgres:
condition: service_healthy
rustfs-init:
condition: service_completed_successfully
kafka:
condition: service_started
rustfs:
image: rustfs/rustfs:latest
volumes:
- rustfs-data:/data
ports:
- 9000:9000
- 9001:9001
environment:
# rustfs:latest refuses the default root credentials on a non-loopback listener. This
# re-enables them so that default credentials continue to work for all dependent services.
- RUSTFS_ALLOW_INSECURE_DEFAULT_CREDENTIALS=true
healthcheck:
test: ['CMD', 'curl', '-sf', 'http://localhost:9000/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
rustfs-init:
image: rustfs/rc:latest
depends_on:
rustfs:
condition: service_healthy
entrypoint: >
/bin/sh -c "
until rc alias set rustfs http://rustfs:9000 rustfsadmin rustfsadmin >/dev/null 2>&1; do
echo 'waiting for rustfs...'; sleep 1;
done;
rc mb -p rustfs/polycentric-blobs"
kafka:
image: apache/kafka:latest
container_name: broker
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: CONTROLLER://0.0.0.0:9093,INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:19092,EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
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
ports:
- 9092:9092
kafka-ui:
image: docker.redpanda.com/redpandadata/console:latest
environment:
CONFIG_FILEPATH: /etc/console/config.yaml
KAFKA_BROKERS: kafka:19092
ports:
- 8080:8080
depends_on:
- kafka
volumes:
- ./kafka-ui.yml:/etc/console/config.yaml
- ./protos:/proto
volumes:
postgres-data:
rustfs-data: