-
Notifications
You must be signed in to change notification settings - Fork 202
/
docker-compose.yml
54 lines (46 loc) · 1.2 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
version: '3.0'
volumes:
postgres-data:
driver: local
redis-data:
driver: local
elasticsearch-data:
driver: local
services:
postgres:
image: postgres:9.6.3
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=not-a-secret
- POSTGRES_USER=librariesio
elasticsearch:
image: elasticsearch:2.4.5
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
command: -Daction.auto_create_index=true
redis:
image: redis:3.2.9
volumes:
- redis-data:/var/lib/redis
command: redis-server --appendonly yes
sidekiq: &app_base
build:
context: .
image: librariesio/libraries.io
environment:
- DATABASE_URL=postgresql://librariesio:not-a-secret@postgres/librariesio
- REDISCLOUD_URL=redis://redis:6379/1
- ELASTICSEARCH_CLUSTER_URL=elasticsearch:9200
volumes:
- .:/libraries.io
depends_on:
- postgres
- elasticsearch
- redis
command: bundle exec sidekiq -C config/sidekiq.yml
web:
<<: *app_base
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails server --port 3000 --binding '0.0.0.0'"
ports:
- "3000:3000"