-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (101 loc) · 2.73 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
version: '3'
services:
db:
image: postgres
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./create_tables.sql:/usr/create_tables.sql
keycloak:
image: jboss/keycloak:4.0.0.Final
environment:
DB_VENDOR: postgres
DB_ADDR: db
DB_PORT: 5432
DB_DATABASE: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_SCHEMA: public
DB_PASSWORD: ${POSTGRES_PASSWORD}
KEYCLOAK_USER: ${KEYCLOAK_USER}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
ports:
- "8080:8080"
command:
- "-b 0.0.0.0"
- "-Dkeycloak.import=/opt/jboss/keycloak/realm_import/realm-export.json"
depends_on:
- db
volumes:
- ./config/keycloak/realm_import:/opt/jboss/keycloak/realm_import
- ./config/keycloak/themes/covid-alert-theme/:/opt/jboss/keycloak/themes/covid-alert-theme/
- ./create_tables.sql:/docker-entrypoint-initdb.d
frontend:
build:
context: ./stop_covid_front
dockerfile: ./Dockerfile
volumes:
- ./stop_covid_front:/app/frontend
- /app/frontend/node_modules
ports:
- "3000:3000"
keycloak-service:
build: keycloak/
image: keycloak
depends_on:
- db
ports:
- "8000:8000"
kafka-service:
build: kafka/
image: kafka
depends_on:
- db
- broker
links:
- broker:broker
ports :
- "8083:8083"
volumes:
- position-logs:/usr/src/positions-logs
zookeeper:
image: confluentinc/cp-zookeeper:5.4.1
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
volumes:
- ./kafka/zoo/data:/var/lib/zookeeper/data
- ./kafka/zoo/log:/var/lib/zookeeper/log
broker:
image: confluentinc/cp-kafka:5.4.1
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
volumes:
- position-logs:/var/lib/kafka/data
#gradle-continuous-builder:
#image: gradle:6.7.0-jdk11
#volumes:
#- gradle-build:/home/gradle/project/.gradle
#- ./:/home/gradle/project:cached
#working_dir: /home/gradle/project
#command: [ "gradle","build","--continuous" ]
volumes:
position-logs: