forked from venturenox/backend_assessment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
100 lines (89 loc) · 2.57 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
version: '3.3'
services:
postgres:
build: backend/postgres-dev/
container_name: postgres
ports:
- 5432:5432
restart: always
volumes:
- ./backend/db_data/:/var/lib/postgresql/data
environment:
POSTGRES_USER: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB_LIST: $POSTGRES_DATABASE_LIST
adminer:
image: adminer
container_name: adminer
restart: always
ports:
- 8090:8080
environment:
ADMINER_DEFAULT_SERVER: postgres
social:
build: backend/social/
container_name: social
command: sh ./docker-entrypoint.sh
restart: always
ports:
- $SOCIAL_PORT:$SOCIAL_PORT
depends_on:
- postgres
- kafka
volumes:
- ./backend/devkeys:/tmp/secrets
- ./backend/social/database/migrations:/usr/app/database/migrations
- ./backend/social/pacts:/usr/app/pacts
environment:
POSTGRES_USERNAME: $POSTGRES_USERNAME
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_HOST: postgres
POSTGRES_DATABASE: $SOCIAL_DB
PACT_BROKER_TOKEN: $PACT_BROKER_TOKEN
PACT_BROKER_BASE_URL: $PACT_BROKER_BASE_URL
# adding kafka
zookeeper:
image: 'bitnami/zookeeper:latest'
container_name: zookeeper
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
# zookeeper:
# image: 'wurstmeister/zookeeper:latest'
# container_name: zookeeper
# ports:
# - '2181:2181'
# environment:
# - ALLOW_ANONYMOUS_LOGIN=yes
# kafka:
# image: 'wurstmeister/kafka:latest'
# ports:
# - '9092:9092'
# environment:
# - KAFKA_BROKER_ID=1
# - KAFKA_LISTENERS=PLAINTEXT://:9092
# - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
# - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
# - ALLOW_PLAINTEXT_LISTENER=yes
# - KAFKA_CREATE_TOPICS="event_stream:1:1"
# depends_on:
# - zookeeper
kafka:
image: 'bitnami/kafka:latest'
container_name: kafka
ports:
- '9092:9092'
- '9093:9093'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
depends_on:
- zookeeper
# - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
# - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092