-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
72 lines (66 loc) · 1.56 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
version: '2'
services:
# Our PostgreSQL service:
postgres:
image: postgres:9.6-alpine
restart: always
volumes:
# We'll mount the 'postgres-data' volume into the location Postgres stores it's data:
- ./volumes/postgres-data:/var/lib/postgresql/data
# Our Redis service:
redis:
image: redis:3.2.4-alpine
restart: always
volumes:
# We'll mount the 'redis-data' volume into the location redis stores it's data:
- ./volumes/redis-data:/data
command: redis-server --appendonly yes
rabbitmq:
image: rabbitmq:3.6.9-alpine
restart: always
volumes:
- ./volumes/rabbitmq:/var/lib/rabbitmq
es:
image: elasticsearch:5.4.0-alpine
restart: always
ports:
- "9300:9200"
volumes:
- ./volumes/es:/usr/share/elasticsearch/data
web:
build: .
command: sh -c "sh wait-curl.sh es:9200 && sh ./init.sh && rails s -p 3000 -b '0.0.0.0'"
restart: always
volumes:
- .:/app
ports:
- "4000:3000"
links:
- postgres
- redis
- es
- rabbitmq
environment:
- POSTGRES_HOST=postgres
- REDIS_HOST=redis
- RABBITMQ_HOST=rabbitmq
- ES_HOST=es
worker:
build: .
command: sh -c "sh wait-curl.sh es:9200 && rake sneakers:run"
restart: always
volumes:
- .:/app
links:
- postgres
- redis
- es
- rabbitmq
depends_on:
- web
environment:
- WORKERS=BugsWorker
- POSTGRES_HOST=postgres
- REDIS_HOST=redis
- RABBITMQ_HOST=rabbitmq
- ES_HOST=es