-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose-token-servers.yml
143 lines (134 loc) · 3.78 KB
/
docker-compose-token-servers.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
services:
esplora:
image: blockstream/esplora
container_name: esplora-container
ports:
- "50001:50001"
- "50002:50002"
- "8094:80"
volumes:
- ./data_bitcoin_regtest:/data
environment:
- CORS_ALLOW=*
command: /srv/explorer/run.sh bitcoin-regtest explorer
vault:
image: hashicorp/vault
environment:
- VAULT_DEV_ROOT_TOKEN_ID=2bbz80mr1zm0tfrjwxyq7f48ofgky848
ports:
- "8200:8200"
vault-init:
image: curlimages/curl
depends_on:
- vault
command: >
sh -c '
sleep 10 &&
curl --header "X-Vault-Token: 2bbz80mr1zm0tfrjwxyq7f48ofgky848" \
--header "Content-Type: application/json" \
--request POST \
--data '"'"'{"data": {"seed": "8b10a037120cf37441bd7623da2aa488c21889017ffb4f4d303b9dbcbada5bee"}}'"'"' \
http://vault:8200/v1/secret/data/mercury-seed &&
touch /tmp/healthy &&
tail -f /dev/null
'
healthcheck:
test: ["CMD-SHELL", "test -f /tmp/healthy"]
interval: 1s
timeout: 1s
retries: 30
lockbox:
build:
context: lockbox
dockerfile: ./Dockerfile
depends_on:
- db_lockbox
- vault-init
environment:
- LOCKBOX_DATABASE_URL=postgres://postgres:postgres@db_lockbox:5432/enclave
- LOCKBOX_PORT=18080
- KEY_MANAGER=hashicorp_container
- HASHICORP_CONTAINER_TOKEN=2bbz80mr1zm0tfrjwxyq7f48ofgky848
- HASHICORP_CONTAINER_URL=http://vault:8200
- HASHICORP_CONTAINER_PATH=mercury-seed
- HASHICORP_CONTAINER_MOUNT_POINT=secret
- HASHICORP_CONTAINER_KEY_NAME=seed
ports:
- "18080:18080"
token-server-v2:
build:
context: .
dockerfile: ./token-server-v2/Dockerfile
container_name: mercurylayer-token-server-v2-1
environment:
PUBLIC_KEY_DESCRIPTOR: wpkh([656a457c/84'/1'/0']tpubDCTXiLu1wcqUwQK6QMPPUTBzbRjsqMABzCvd5vG22KGoA95cTG1VkszQQJyx24UP8KEJVKrKRDRtUPodHVV59CfNqUkXjKUagowHJVSWq4C/0/*)#vn0n5xcd
BITCOIN_NETWORK: regtest
ELECTRUM_SERVER: tcp://esplora:50001
FEE: 10000
CONFIRMATION_TARGET: 2
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: db_server
DB_PORT: 5432
DB_NAME: mercury
ports:
- "8001:8001"
depends_on:
- esplora
- db_server
mercury-server:
build:
context: .
dockerfile: server/Dockerfile
container_name: mercurylayer-mercury-server-1
depends_on:
- db_server
- lockbox
- token-server-v2
environment:
BITCOIN_NETWORK: regtest
LOCKHEIGHT_INIT: 1000
LH_DECREMENT: 10
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: db_server
DB_PORT: 5432
DB_NAME: mercury
BATCH_TIMEOUT: 20
ENCLAVES: '[{"url": "http://lockbox:18080", "allow_deposit": true}]'
NOSTR_INFO: '{
"relay_server": "wss://relay.damus.io/",
"relay_interval": 15,
"nostr_privkey": "nsec17e0nvplcze4k7q9nazrw0k3aracwhg6vmuareewjp83ta89njw5spjcgzs",
"server_url": "http://mercury_server.xyz",
"location": "UK",
"active": true,
"onchain_payments": false,
"ln_payments": true,
"fee": 0.0001,
"unit": "BTC"
}'
TOKEN_SERVER_URL: http://token-server-v2:8001
ports:
- "8000:8000"
db_lockbox:
image: postgres:16.2
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: enclave
ports:
- "5433:5432"
volumes:
- postgres_lockbox_data:/var/lib/postgresql/data
db_server:
image: postgres:16.2
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mercury
ports:
- "5432:5432"
volumes:
- postgres_server_data:/var/lib/postgresql/data
volumes:
postgres_lockbox_data:
postgres_server_data: