-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
78 lines (70 loc) · 2.14 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
version: '3.1'
services:
solr:
image: umedia_solr:dev
volumes:
- ./snapshots:/snapshots
ports: ['127.0.0.1:8983:8983']
solr_test:
image: umedia_solr:test
ports: ['127.0.0.1:8984:8983']
volumes:
- ./snapshots_test:/snapshots
- ./test_index:/test_index/
app:
build: .
command: >
bash -c "
# Run test server detached
# Test server only shows 1 collection per page, to force the collections pager to render on the home page
# and therefore ensure selenium tests can click on the pager prev/next and indexed pages
RAILS_ENV=test SOLR_URL=http://solr_test:8983/solr/core UMEDIA_COLLECTION_PAGE_LIMIT=1 bundle exec puma -b tcp://0.0.0.0:3001 -d &&
# Run web server
UMEDIA_COLLECTION_PAGE_LIMIT=20 bundle exec puma -C config/puma.rb"
ports: ['127.0.0.1:3000:3000', '127.0.0.1:3001:3001']
env_file:
- .env
volumes:
- .:/app
stdin_open: true
tty: true
links:
- solr
- redis_cache
depends_on:
- solr
- solr_test
sidekiq:
build: .
# 2 queues default & critical, concurrency of 5 (used to be 1 but way too slow)
# application root at /app
# Reduce -c concurrency if your dev machine CPU can't keep up with this
# but when it is at -c 1 this sample record load may take an hour
command: bundle exec sidekiq -q critical,2 -q default -c 5 -r /app
volumes:
- .:/app
links:
- redis
env_file:
- .env
webpacker:
build: .
command: ./bin/webpack-dev-server
volumes:
- .:/app
ports: ['3035:3035']
redis:
image: redis:4.0.10
redis_cache:
image: redis:4.0.10
command: redis-server /usr/local/etc/redis/redis.conf
volumes:
- ./docker/redis-cache.conf:/usr/local/etc/redis/redis.conf
selenium:
# NOTE: If selenium crashes after start (as on Fedora Linux), the Docker systemd service may need greater
# open file limits
# https://stackoverflow.com/a/69864234/541091
image: selenium/standalone-chrome-debug:3.141.59-europium
ports: ['127.0.0.1:4444:4444', '127.0.0.1:5900:5900']
stdin_open: true
tty: true