Browse Source

Merge pull request #2 from mayankchhabra/master

Add middleware
patch-1
Mayank Chhabra 5 years ago
committed by GitHub
parent
commit
7e7954e451
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      configure-box.sh
  2. 16
      docker-compose.yml
  3. 29
      invoicer/invoicer.conf
  4. 0
      invoicer/www/.gitkeep
  5. 4
      nginx/conf.d/default.conf

2
configure-box.sh

@ -23,8 +23,6 @@ cd ..
echo "Installing RPCAuth into bitcoin.conf"
cat secrets/rpcauth.txt >> bitcoin/bitcoin.conf
RPCPASS=`cat secrets/rpcpass.txt`
echo "Configuring invoicer rpc info"
sed -i "s/RPCPASS/${RPCPASS}/g; " invoicer/invoicer.conf
echo "Configuring LND rpc info"
sed -i "s/RPCPASS/${RPCPASS}/g; " lnd/lnd.conf
if [ ! -z $TESTNET ]; then

16
docker-compose.yml

@ -40,15 +40,21 @@ services:
depends_on: [ bitcoin, web ]
network_mode: host
stop_grace_period: 1m30s
invoicer:
image: "lncm/invoicer:v0.6.6"
middleware:
image: getumbrel/middleware:v0.0.5
depends_on: [ bitcoin, lnd ]
logging: *default-logging
restart: on-failure
network_mode: host
volumes:
- "${HOME}/invoicer:/root/.lncm"
- "${HOME}/invoicer:/lncm"
- "${HOME}/lnd:/lnd"
- "${HOME}/lnd:/lnd"
environment:
BITCOIN_HOST: "0.0.0.0"
RPC_PORT: "8332"
RPC_USER: ""
RPC_PASSWORD: ""
LND_NETWORK: "mainnet"
LND_HOST: "127.0.0.1"
lnd-unlock:
build: ${HOME}/build/lnd-unlock/
depends_on: [ lnd ]

29
invoicer/invoicer.conf

@ -1,29 +0,0 @@
# Note: all values used in this file are defaults that are used if nothing is provided
port = 8181
static-dir = "/lncm/www/"
log-file = "/lncm/invoicer.log"
ln-client = "lnd"
off-chain-only = false
[bitcoind]
host = "localhost"
port = 8332
user = "lncm"
pass = "RPCPASS"
[lnd]
host = "localhost"
port = 10009
tls = "/lnd/tls.cert"
kill-count = 4
[lnd.macaroon]
invoice = "/lnd/data/chain/bitcoin/mainnet/invoice.macaroon"
readonly = "/lnd/data/chain/bitcoin/mainnet/readonly.macaroon"
[users]
# username = "password"

0
invoicer/www/.gitkeep

4
nginx/conf.d/default.conf

@ -10,8 +10,8 @@ server {
try_files $uri $uri/ /index.html;
}
location /invoicer/ {
location /api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
proxy_pass http://localhost:8181/api/;
proxy_pass http://localhost:3005/;
}
}

Loading…
Cancel
Save