-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.local.yml
103 lines (103 loc) · 2.73 KB
/
docker-compose.local.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
103
# Docker Compose creates multiple containers on a single machine.
# run `docker-compose up` to create and run/link the containers
version: '3.4'
services:
db:
image: mongo:6.0.7
ports:
- "27017:27017"
volumes:
- dbdata:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
command: "mongod --setParameter internalQueryMaxAddToSetBytes=${MONGO_MEM} --setParameter internalQueryMaxBlockingSortMemoryUsageBytes=${MONGO_MEM}"
queue:
image: redis:6.0.9
ports:
- "6379:6379"
command: "redis-server --requirepass ${REDIS_PASSWORD} --maxclients 40000"
web:
image: 127.0.0.1:5000/openstudio-server
build:
context: .
target: base
args:
rails_env: docker
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=analysis_wrappers
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
depends_on:
- db
- queue
ports:
- "8080:80"
volumes:
- osdata:/mnt/openstudio
command: /usr/local/bin/start-server
web-background:
image: 127.0.0.1:5000/openstudio-server
build:
context: .
target: base
args:
rails_env: docker
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=background,analyses
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
depends_on:
- db
- queue
- web
volumes:
- osdata:/mnt/openstudio
command: /usr/local/bin/start-web-background
worker:
image: 127.0.0.1:5000/openstudio-server
build:
context: .
target: base
args:
rails_env: docker
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=requeued,simulations
- COUNT=1
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
depends_on:
- web
- db
- queue
- rserve
command: /usr/local/bin/start-workers
rserve:
image: 127.0.0.1:5000/openstudio-rserve
build: ./docker/R
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
volumes:
- osdata:/mnt/openstudio
depends_on:
- web
- web-background
- db
volumes:
osdata:
external: true
dbdata:
external: true