-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
132 lines (130 loc) · 3.82 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
132 lines (130 loc) · 3.82 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Docker Compose creates multiple containers on a single machine.
# run `docker-compose up` to create and run/link the containers
services:
db:
image: mongo:8.0.12
ports:
- "27017:27017"
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: nrel/openstudio-server:latest
platform: ${DOCKER_PLATFORM:-linux/amd64}
build:
context: .
args:
rails_env: docker
bundle_args: ''
# embed layer-cache metadata so pushed images can seed later builds (BuildKit
# no longer uses pulled images as cache without it, unlike the classic builder)
BUILDKIT_INLINE_CACHE: '1'
cache_from:
- nrel/openstudio-server:latest
environment:
- CI
- COVERALLS_REPO_TOKEN
- OS_SERVER_NUMBER_OF_WORKERS=1
- MAX_REQUESTS=10
- MAX_POOL=10
- QUEUES=analysis_wrappers
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- SKIP_COVERALLS=true
depends_on:
- db
- queue
ports:
- "8080:80"
- "80:80"
- "443:443"
volumes:
- ./reports:/opt/openstudio/reports
- osdata:/mnt/openstudio
command: /usr/local/bin/start-server
web-background:
image: nrel/openstudio-server:latest
platform: ${DOCKER_PLATFORM:-linux/amd64}
build:
context: .
args:
rails_env: docker
bundle_args: ''
# embed layer-cache metadata so pushed images can seed later builds (BuildKit
# no longer uses pulled images as cache without it, unlike the classic builder)
BUILDKIT_INLINE_CACHE: '1'
cache_from:
- nrel/openstudio-server:latest
environment:
- OS_SERVER_NUMBER_OF_WORKERS=1
- 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: nrel/openstudio-server:latest
platform: ${DOCKER_PLATFORM:-linux/amd64}
build:
context: .
args:
rails_env: docker
bundle_args: ''
# embed layer-cache metadata so pushed images can seed later builds (BuildKit
# no longer uses pulled images as cache without it, unlike the classic builder)
BUILDKIT_INLINE_CACHE: '1'
cache_from:
- nrel/openstudio-server:latest
environment:
- OS_SERVER_NUMBER_OF_WORKERS=1
- 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: nrel/openstudio-rserve:latest
platform: ${DOCKER_PLATFORM:-linux/amd64}
build:
context: ./docker/R
args:
BUILDKIT_INLINE_CACHE: '1'
cache_from:
- nrel/openstudio-rserve:latest
environment:
- OS_SERVER_NUMBER_OF_WORKERS=1
- 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