forked from morphocluster/morphocluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.default.yml
More file actions
75 lines (71 loc) · 1.88 KB
/
docker-compose.default.yml
File metadata and controls
75 lines (71 loc) · 1.88 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
72
73
74
75
services:
morphocluster:
build:
context: .
dockerfile: docker/morphocluster/Dockerfile
ports:
# Expose port 8001 (web service)
- "8001:8000"
depends_on:
- postgres
- redis-lru
restart: unless-stopped
volumes:
- morphocluster-data:/data
environment:
# Store command history in the data volume
- HISTSIZE=-1
- HISTFILESIZE=-1
- HISTFILE=/data/.bash_history
- FLASK_APP=morphocluster
# # TODO: Uncomment this block to use the host's GPU inside the container
# deploy:
# resources:
# reservations:
# devices:
# - capabilities:
# - gpu
postgres:
image: postgres:12-alpine
environment:
POSTGRES_USER: morphocluster
POSTGRES_PASSWORD: morphocluster
POSTGRES_DB: morphocluster
ports:
- "5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/postgresql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
# Increase shared memory to allow for big queries
shm_size: '2gb'
restart: unless-stopped
redis-rq:
image: "redis:5-alpine"
ports:
- "6379"
restart: unless-stopped
redis-lru:
image: "redis:5-alpine"
ports:
- "6379"
volumes:
- ./docker/redis-lru/redis/redis.conf:/usr/local/etc/redis/redis.conf
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
restart: unless-stopped
rq-worker:
build:
context: .
dockerfile: docker/morphocluster/Dockerfile
depends_on:
- postgres
- redis-rq
restart: unless-stopped
volumes:
- morphocluster-data:/data
environment:
- FLASK_APP=morphocluster
command: ["rq", "worker", "--url", "redis://redis-rq:6379"]
volumes:
# We use named volumes so that the data is not lost if the image is rebuilt
postgres-data:
morphocluster-data: