-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (68 loc) · 1.5 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
services:
server:
deploy:
resources:
# CPU and memory limits similar to the production setup
limits:
cpus: '2.0'
memory: 1g
reservations:
cpus: '2.0'
memory: 1g
build:
dockerfile: cmd/order-book.Dockerfile
context: .
args:
APP_PATH: ./cmd/order-book
COMMIT_SHA: local
ports:
- "80:8080"
environment:
- REDIS_URL=redis://db:6379/0
- PORT=8080
- RPC_URL=${RPC_URL}
- LOG_LEVEL=debug
- REPORT_SEC_INTERVAL=999999999999
depends_on:
- db
develop:
watch:
- action: rebuild
path: .
files:
- ./**/*.go
- ./go.mod
- ./go.sum
db:
image: redis:7.2.1-alpine
restart: always
ports:
- "6379:6379"
# Max clients and memory limit similar to the production setup
command: redis-server --save 60 1 --loglevel warning --maxclients 512 --maxmemory 512mb
volumes:
- db:/data
pending-swaps-tracker:
build:
dockerfile: cmd/order-book.Dockerfile
context: .
args:
APP_PATH: ./cmd/pending-swaps-tracker
COMMIT_SHA: local
environment:
- REDIS_URL=redis://db:6379/0
- RPC_URL=${RPC_URL}
- LOG_LEVEL=debug
depends_on:
- db
develop:
watch:
- action: rebuild
path: .
files:
- ./**/*.go
- ./go.mod
- ./go.sum
volumes:
db:
driver: local