-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yaml
80 lines (74 loc) · 1.67 KB
/
docker-compose.yaml
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
# prettier-ignore
version: "3.9"
networks:
web:
name: web
external: false
internal:
name: internal
external: false
services:
api:
build: .
profiles: ["server", "api"]
restart: unless-stopped
env_file:
- .env
networks:
- internal
- web
deploy:
replicas: ${API_REPLICAS}
restart_policy:
max_attempts: 3
condition: on-failure
command: npm start
nginx:
image: nginx:latest
profiles: ["server", "api"]
restart: unless-stopped
env_file:
- .env
volumes:
- ./nginx.conf.template:/etc/nginx/nginx.conf.template
depends_on:
- api
networks:
- internal
- web
ports:
- ${API_PORT}:${API_PORT}
command: /bin/bash -c "envsubst < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
bitcoin:
image: ruimarinho/bitcoin-core
profiles: ["local", "bitcoin"]
restart: unless-stopped
labels:
- traefik.enable=false
ports:
- ${RPC_PORT}:${RPC_PORT} # regtest:18443 testnet:18332 signet:38332 mainnet:8332
volumes:
- ./.data/bitcoin:/home/bitcoin/.bitcoin
networks:
- internal
command:
-printtoconsole
-txindex=1
-${NETWORK}=1
-rpcallowip=0.0.0.0/0
-rpcbind=0.0.0.0
-rpcuser=bitcoin
-rpcpassword=bitcoin
-blocknotify='curl ${RPC_NOTIFY}/hooks/bitcoin?block=%s'
mongodb:
image: mongo:latest
profiles: ["local", "db", "mongodb"]
restart: unless-stopped
labels:
- traefik.enable=false
ports:
- ${MONGO_PORT}:27017
networks:
- internal
volumes:
- ./.data/mongodb:/data/db