-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
73 lines (67 loc) · 1.52 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
66
67
68
69
70
71
72
73
version: '3.7'
services:
communicator:
build: ./stream_communication
command: python stream_communication.py
networks:
- wiki-network
depends_on:
cassandra-load-keyspace:
condition: service_completed_successfully
cassandra:
image: cassandra:3.11.2
container_name: cassandra
ports:
- "9042:9042"
expose:
- "9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
restart: always
healthcheck:
test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces" ]
interval: 15s
timeout: 10s
retries: 10
networks:
- wiki-network
cassandra-load-keyspace:
container_name: cassandra-load-keyspace
image: cassandra:3.11.2
depends_on:
cassandra:
condition: service_healthy
volumes:
- ./cassandra/schema.cql:/schema.cql
command: /bin/bash -c "echo loading cassandra keyspace && cqlsh cassandra -f /schema.cql"
networks:
- wiki-network
web-app:
build: .
command: python ./webapp/app.py
ports:
- "5000:5000"
volumes:
- .:/app
expose:
- "5000"
depends_on:
- communicator
networks:
- wiki-network
healthcheck:
test: curl --fail http://0.0.0.0:5000/ || exit 1
interval: 60s
retries: 5
timeout: 10s
spark:
build: .
command: python3 api_1/spark_processing.py
networks:
- wiki-network
depends_on:
- web-app
networks:
wiki-network:
name: wiki-network