forked from ib-ai/IB.ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (47 loc) · 1016 Bytes
/
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
version: '3.4'
services:
# The Java bot process -- uses Dockerfile in ./docker/
# Will attempt to restart 3 times.
bot:
image: ib.ai
restart: on-failure:3
build:
context: ./
dockerfile: prod.Dockerfile
env_file:
- bot.env
deploy:
resources:
limits:
memory: 1500M
reservations:
memory: 500M
depends_on:
- db
# Redis database
# Running on port 6379, on a failure it will restart itself
# Connect via the URL 'redis://db:6379'
db:
restart: always
image: redis
deploy:
resources:
limits:
memory: 50M
reservations:
memory: 20M
volumes:
- db-data:/data
# Automated backup of Redis image to S3 object storage
backup:
image: pants1/docker-volume-backup
restart: on-failure
env_file:
- backup.env
volumes:
- /var/lib/docker/volumes/:/HostVolumeData
depends_on:
- db
volumes:
# Database persistence
db-data: