-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
65 lines (65 loc) · 1.6 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
version: '3.8'
services:
rabbitmq:
image: rabbitmq:3.8.9-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=password
ports:
- '5672:5672'
- '15672:15672'
volumes:
- rabbitmq-data:/data/
database:
build: dev/postgres
restart: unless-stopped
environment:
POSTGRES_DB: dummy
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- ./:/pgevents
- database-data:/var/lib/postgresql/data/
producer:
build: .
restart: unless-stopped
environment:
PGHOST: database
PGPORT: 5432
PGDATABASE: dummy
PGUSER: postgres
PGPASSWORD: postgres
PGREPLICATIONSLOT: pgevents
PGOUTPUTPLUGIN: wal2json
PGTABLES: public.users
PGPUBLICATION: events
RABBITMQ_URL: amqp://admin:password@rabbitmq:5672/?heartbeat=0
RABBITMQ_EXCHANGE: pgevents_exchange
LOG_LEVEL: DEBUG
command: ["bash", "-c", "producer"]
volumes:
- ./producer:/pgevents/producer
- ./tests:/pgevents/tests
depends_on:
- database
- rabbitmq
event_logger:
build: .
restart: unless-stopped
environment:
RABBITMQ_URL: amqp://admin:password@rabbitmq:5672/?heartbeat=0
RABBITMQ_EXCHANGE: pgevents_exchange
LOG_LEVEL: DEBUG
RABBITMQ_BINDING_KEYS: #
RABBITMQ_QUEUE_NAME: all_events_queue
command: ["bash", "-c", "event_logger"]
volumes:
- ./consumer:/pgevents/consumer
depends_on:
- database
- rabbitmq
volumes:
database-data:
rabbitmq-data: