-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (100 loc) · 3.6 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
version: "3"
services:
#### ZOOKEEPER #####
zookeeper:
image: "bitnami/zookeeper:latest"
container_name: zookeeper
hostname: zookeeper
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
app-tier:
ipv4_address: 172.18.0.10
#### KAFKA #####
kafka:
image: "bitnami/kafka:latest"
container_name: kafka
hostname: kafka
ports:
- "9092:9092"
- "9093:9093"
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- 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_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper
networks:
app-tier:
ipv4_address: 172.18.0.11
#### SPARK #####
spark:
image: docker.io/bitnami/spark
container_name: spark
hostname: spark
user: root
working_dir: /home
command: "./run.sh"
environment:
- SPARK_MODE=master
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- KAFKA_APP_TOPIC=mocommender_topic
- KAFKA_BOOTSTRAP_SERVERS=kafka:9092
ports:
- "8080:8080"
volumes:
- ./spark:/home:Z
networks:
app-tier:
ipv4_address: 172.18.0.12
#### POSTGRES FOR MOVIES #####
postgres:
image: postgres:alpine
hostname: postgres
container_name: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mocommender
PGDATA: /pg-data
networks:
app-tier:
ipv4_address: 172.18.0.13
ports:
- "5432:5432"
volumes:
- ./postgres/pg-data:/pg-data:Z
- ./postgres/schemas/00_genre.sql:/docker-entrypoint-initdb.d/00_genre.sql:z
- ./postgres/schemas/01_cast.sql:/docker-entrypoint-initdb.d/01_cast.sql:z
- ./postgres/schemas/02_crew.sql:/docker-entrypoint-initdb.d/02_crew.sql:z
- ./postgres/schemas/03_keyword.sql:/docker-entrypoint-initdb.d/03_keyword.sql:z
- ./postgres/schemas/04_language.sql:/docker-entrypoint-initdb.d/04_language.sql:z
- ./postgres/schemas/05_country.sql:/docker-entrypoint-initdb.d/05_country.sql:z
- ./postgres/schemas/06_company.sql:/docker-entrypoint-initdb.d/06_company.sql:z
- ./postgres/schemas/07_metadata.sql:/docker-entrypoint-initdb.d/07_metadata.sql:z
- ./postgres/schemas/10_metadata_genre.sql:/docker-entrypoint-initdb.d/10_metadata_genre.sql:z
- ./postgres/schemas/11_metadata_cast.sql:/docker-entrypoint-initdb.d/11_metadata_cast.sql:z
- ./postgres/schemas/12_metadata_crew.sql:/docker-entrypoint-initdb.d/12_metadata_crew.sql:z
- ./postgres/schemas/13_metadata_keyword.sql:/docker-entrypoint-initdb.d/13_metadata_keyword.sql:z
- ./postgres/schemas/14_metadata_language.sql:/docker-entrypoint-initdb.d/14_metadata_language.sql:z
- ./postgres/schemas/15_metadata_country.sql:/docker-entrypoint-initdb.d/15_metadata_country.sql:z
- ./postgres/schemas/16_metadata_company.sql:/docker-entrypoint-initdb.d/16_metadata_company.sql:z
- ./postgres/schemas/17_user.sql:/docker-entrypoint-initdb.d/17_user.sql:z
- ./postgres/schemas/18_user_movie.sql:/docker-entrypoint-initdb.d/17_user_movie.sql:z
networks:
app-tier:
driver: bridge
ipam:
driver: default
config:
- subnet: "172.18.0.0/16"