-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
40 lines (37 loc) · 893 Bytes
/
Copy pathdocker-compose.dev.yml
File metadata and controls
40 lines (37 loc) · 893 Bytes
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
version: "3"
services:
cassandra:
container_name: urlshortener-cassandra
image: cassandra:latest
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
restart: always
volumes:
- ./cassandra_data:/var/lib/cassandra
cassandra-load-keyspace:
container_name: urlshortener-cassandra-load-keyspace
image: cassandra:latest
depends_on:
- cassandra
volumes:
- ./backend/urlShortener.cql:/urlShortener.cql
command: /bin/bash -c "sleep 60 && echo loading cassandra keyspace && cqlsh cassandra -f /urlShortener.cql"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
redis:
container_name: cache
image: redis
ports:
- 6379:6379
volumes:
- redis:/data
volumes:
redis:
driver: local