-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (81 loc) · 1.85 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
version: "3.8"
services:
database:
image: postgres
volumes:
- data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
cache:
image: 'bitnami/redis:latest'
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
rabbitmq:
image: rabbitmq:3-management
hostname: rabbitmq
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:15672"]
interval: 2s
timeout: 10s
retries: 20
server:
build:
context: .
dockerfile: DOCKERFILE.api
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -e production -p 8080 -b '0.0.0.0'"
env_file: .env
environment:
- REDIS_HOST=cache
- DB_HOST=database
- DB_USERNAME=postgres
depends_on:
- database
- cache
ports:
- "8080:8080"
binance_listner:
build:
context: .
dockerfile: DOCKERFILE.binance_listner
command: bash -c "rails binance_listner:listen"
env_file: .env
environment:
- CACHE_PASSWORD=password
- CACHE_HOST=cache
- DB_HOST=database
- DB_USERNAME=postgres
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
restart: on-failure
depends_on:
- rabbitmq
- database
- cache
links:
- rabbitmq
email_service:
build:
context: .
dockerfile: DOCKERFILE.email_service
command: bash -c "rails email_service:start RAILS_ENV=production"
env_file: .env
environment:
- CACHE_PASSWORD=password
- CACHE_HOST=cache
- DB_HOST=database
- DB_USERNAME=postgres
- RABBITMQ_HOST=guest
- RABBITMQ_USER=guest
restart: on-failure
depends_on:
- rabbitmq
- database
- cache
links:
- rabbitmq
volumes:
data: