-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (109 loc) · 3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
113 lines (109 loc) · 3 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
services:
api:
build:
context: .
dockerfile: docker/Dockerfile.api
ports:
- "60002:8080"
environment:
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/crypto?sslmode=disable
- FIAT_API_URL=${FIAT_API_URL:-https://api.coingecko.com}
- BTC_RPC_URL=${BTC_RPC_URL:-https://bitcoin-testnet.gateway.tatum.io}
- BTC_RPC_USER=${BTC_RPC_USER:-}
- BTC_RPC_PASS=${BTC_RPC_PASS:-}
- LTC_RPC_URL=${LTC_RPC_URL:-https://litecoin-testnet.gateway.tatum.io}
- LTC_RPC_USER=${LTC_RPC_USER:-}
- LTC_RPC_PASS=${LTC_RPC_PASS:-}
- SOL_RPC_URL=${SOL_RPC_URL:-https://solana-devnet.gateway.tatum.io}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M
backend:
build:
context: .
dockerfile: docker/Dockerfile.backend
ports:
- "60001:8081"
environment:
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/crypto?sslmode=disable
- BTC_RPC_URL=${BTC_RPC_URL:-https://bitcoin-testnet.gateway.tatum.io}
- BTC_RPC_USER=${BTC_RPC_USER:-}
- BTC_RPC_PASS=${BTC_RPC_PASS:-}
- LTC_RPC_URL=${LTC_RPC_URL:-https://litecoin-testnet.gateway.tatum.io}
- LTC_RPC_USER=${LTC_RPC_USER:-}
- LTC_RPC_PASS=${LTC_RPC_PASS:-}
- SOL_RPC_URL=${SOL_RPC_URL:-https://solana-devnet.gateway.tatum.io}
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8081/health/live"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M
frontend:
build:
context: ./frontend
dockerfile: ../docker/Dockerfile.frontend
ports:
- "60000:80"
depends_on:
- api
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.25'
memory: 128M
reservations:
cpus: '0.1'
memory: 64M
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=crypto
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
volumes:
postgres_data: