-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.cassandra.yml
More file actions
71 lines (66 loc) · 1.71 KB
/
docker-compose.cassandra.yml
File metadata and controls
71 lines (66 loc) · 1.71 KB
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
version: '3.8'
services:
cassandra:
image: cassandra:4.1
container_name: web-scraper-cassandra
ports:
- "9042:9042"
- "9160:9160" # Thrift port (optional)
environment:
- CASSANDRA_CLUSTER_NAME=WebScraperCluster
- CASSANDRA_DC=datacenter1
- CASSANDRA_RACK=rack1
- CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch
- CASSANDRA_NUM_TOKENS=256
- MAX_HEAP_SIZE=1G
- HEAP_NEWSIZE=200M
volumes:
- cassandra_data:/var/lib/cassandra
- ./deployment/cassandra/cassandra.yaml:/etc/cassandra/cassandra.yaml
- ./deployment/cassandra/init-scripts:/docker-entrypoint-initdb.d
networks:
- scraper-network
healthcheck:
test: ["CMD-SHELL", "cqlsh -e 'describe cluster'"]
interval: 30s
timeout: 10s
retries: 5
start_period: 2m
cassandra-web:
image: markusgulden/cassandra-web:latest
container_name: cassandra-web-ui
ports:
- "3000:3000"
environment:
- CASSANDRA_HOST=cassandra
- CASSANDRA_PORT=9042
depends_on:
cassandra:
condition: service_healthy
networks:
- scraper-network
web-scraper:
build:
context: .
dockerfile: Dockerfile
container_name: web-scraper-app
environment:
- CASSANDRA_HOSTS=cassandra
- CASSANDRA_KEYSPACE=web_scraper
- CASSANDRA_PORT=9042
- PYTHONPATH=/app
volumes:
- ./storage:/app/storage
- ./logs:/app/logs
depends_on:
cassandra:
condition: service_healthy
networks:
- scraper-network
command: ["python", "src/main.py", "--file", "seeds.txt"]
volumes:
cassandra_data:
driver: local
networks:
scraper-network:
driver: bridge