-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
221 lines (193 loc) · 5.9 KB
/
docker-compose.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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# This file is meant for development, in production we use a slightly different
# configuration
version: '3'
services:
app:
build:
context: rails
dockerfile: Dockerfile-dev
command: docker/dev/run.sh
environment:
DB_HOST: mysql
DB_USER: root
DB_PASSWORD: xyzzy
#
# Solr hosts and ports
#
SOLR_HOST: solr
SOLR_PORT: 8983
TEST_SOLR_HOST: solr-test
TEST_SOLR_PORT: 8981
PORTAL_FEATURES:
#
# OAuth keys
#
SCHOOLOGY_CONSUMER_KEY:
SCHOOLOGY_CONSUMER_SECRET:
GOOGLE_CLIENT_KEY:
GOOGLE_CLIENT_SECRET:
SITE_URL: "${PORTAL_PROTOCOL:-http}://${PORTAL_HOST:-app.portal.docker}"
RESEARCHER_REPORT_ONLY:
#
# ASN API key
#
ASN_API_KEY:
#
# external css URL
#
EXTERNAL_CSS_URL:
#
# Google analytics property ID
#
GOOGLE_ANALYTICS_ACCOUNT:
#
# Google Optimizer property ID
#
GOOGLE_OPTIMIZER_ACCOUNT:
#
# MailChimp API information
ENEWS_API_KEY:
ENEWS_API_URI:
ENEWS_API_LISTID:
#
# OG tag default values
#
OG_TITLE:
OG_DESCRIPTION:
OG_IMAGE_URL:
#
# Set to true to enable dynamic robots.txt
#
DYNAMIC_ROBOTS_TXT:
#
# When PORTAL_FEATURES has "allow_cors" set this to a list of
# origins, or * for all.
#
CORS_ORIGINS:
#
# Set the portal version displayed in the UI footer.
#
CC_PORTAL_VERSION:
#
# Set rollbar access tokens
#
ROLLBAR_ACCESS_TOKEN:
ROLLBAR_CLIENT_ACCESS_TOKEN:
#
# Devise secret key 64 hex-encoded bytes
# generate one using eg: hexdump -n 64 -v -e ' 64/1 "%02X" "\n"' /dev/urandom
DEVISE_SECRET_KEY:
#
# Set JWT HMAC secret
#
JWT_HMAC_SECRET:
#
# override this to specify a different elastic search server
#
ELASTICSEARCH_URL: "${ELASTICSEARCH_URL:-http://elasticsearch:9200}"
#
# used to pass context to selenium
#
DOCKER: 'true'
#
# Enables logging to stdout instead of file. Override this in .env
#
RAILS_STDOUT_LOGGING: "${RAILS_STDOUT_LOGGING:-true}"
# Logging levels. Override this in .env
# DEBUG | INFO | WARN | ERROR | FATAL | UNKNOWN
TEST_LOG_LEVEL: "${TEST_LOG_LEVEL:-WARN}"
DEV_LOG_LEVEL: "${DEV_LOG_LEVEL:-DEBUG}"
#
# Source for report service lookups
#
REPORT_SERVICE_SOURCE: "app_lara_docker"
# Used by imagemagick to add attribution to the images in the image library
# the DejaVu-Sans font is provided by the docker image this one is built on
WATERMARK_FONT: "${WATERMARK_FONT:-DejaVu-Sans}"
#
# Rails 4 encrypted cookies:
#
RAILS_SECRET_KEY_BASE: "${RAILS_SECRET_KEY_BASE:-local_dev_only_secret_key_base}"
#
# Log manager endpoint (defaults to staging)
#
LOGGER_URI: "${LOGGER_URI:-https://logger.concordqa.org/logs}"
THEME: "${THEME:-learn}"
VIRTUAL_HOST: "${PORTAL_HOST:-app.portal.docker}"
# These are used for initialization code which creates external reports, and auth clients
# They aren't needed at runtime
LARA_DOMAIN: "${LARA_DOMAIN:-app.lara.docker}"
LARA_TOOL_ID: "${LARA_DOMAIN:-app.lara.docker}.${USER}"
# open standard in and turn on tty so we can attach to the container and debug it
stdin_open: true
tty: true
# no ports are published, see below for details
volumes:
- ./rails:/rigse
- bundle:/bundle
networks:
# the portal network allows external connections
portal:
aliases:
- portal
# app service needs to be on default network too so it can connect to mysql and solr
default:
depends_on:
- mysql
solr:
image: concordconsortium/docker-solr-portal
# no ports are published, see below for details
volumes:
- ./rails:/rigse
command: /bin/bash ./start-solr.sh
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD:
# --sql-mode=NO_ENGINE_SUBSTITUTION fixes random SQL issues that showed up after upgrading MySQL to v5.7.
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --sql-mode=NO_ENGINE_SUBSTITUTION
volumes:
# use a named volume here so the database is preserved after a down and up
- mysql:/var/lib/mysql
solr-test:
image: concordconsortium/docker-solr-portal
environment:
TEST_SOLR_PORT: 8981
#
# Mount the portal source in the container under /rigse
#
volumes:
- ./rails:/rigse
#
# Invoke the docker/dev/start-solr-test.sh script allowing us
# to specify a port and other parameters.
#
command: ["/bin/bash", "-c", "/rigse/docker/dev/start-solr-test.sh -f -p $${TEST_SOLR_PORT}" ]
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.1
environment:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xmx256m -Xms256m
ports:
# this should be left unspecified so the random ports approach can be used
- 9200:9200
- 9300:9300
networks:
- portal
- default
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.1.1
volumes:
bundle:
mysql:
networks:
# create a portal network so other services such as LARA can be part of this network
# and connect with the web app.
portal:
# In this file the web app and solr ports are not published. However, if you run
# `docker-compose up` (without customizing your environment) the ports will be published
# to 3000 and 8983. This is because the docker-compose.override.yml file will be loaded
# automatically by docker-compose.
# You will likely want to modify how the ports are published, so they don't conflict.
# Take a look at the this overlay for more information:
# docker/dev/docker-compose-random-ports.yml