Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Auth, wallet unlock separation, container updates #12

Merged
merged 7 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Abstract

This is a basic framework for orchestration of the box services for running a full lightning and bitcoin node.
This is a basic framework for orchestration of the services required to run an Umbrel bitcoin and lightning node.

## How to use

Expand Down Expand Up @@ -57,9 +57,6 @@ wget -qO- "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/con
docker-compose up -d --build
# verify the containers
docker ps -a

# Additional node: You should have a way of creating a wallet. Currently this container does not have a create wallet container.
# For the unlock script to work, put the unlock password in secrets/lnd-password.txt
```


Expand Down
11 changes: 0 additions & 11 deletions build/lnd-unlock/Dockerfile

This file was deleted.

57 changes: 0 additions & 57 deletions build/lnd-unlock/unlock.sh

This file was deleted.

Empty file added db/jwt-private-key/.gitkeep
Empty file.
Empty file added db/jwt-public-key/.gitkeep
Empty file.
42 changes: 27 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ x-utility: &default-utility
network_mode: host

services:
web:
nginx:
image: nginx:1.17.8
logging: *default-logging
volumes:
Expand All @@ -37,30 +37,42 @@ services:
- /var/lib/tor:/var/lib/tor
- /run/tor:/run/tor/
restart: on-failure
depends_on: [ bitcoin, web ]
network_mode: host
stop_grace_period: 1m30s
dashboard:
image: getumbrel/dashboard:v0.2.0
logging: *default-logging
restart: always
network_mode: host
manager:
image: getumbrel/manager:v0.1.0
logging: *default-logging
restart: unless-stopped
network_mode: host
volumes:
- "${HOME}/db:/db"
environment:
PORT: "3006"
USER_PASSWORD_FILE: "/db/user.json"
JWT_PUBLIC_KEY_FILE: "/db/jwt-public-key/jwt.pem"
JWT_PRIVATE_KEY_FILE: "/db/jwt-private-key/jwt.key"
JWT_EXPIRATION: "3600"
middleware:
image: getumbrel/middleware:v0.0.5
depends_on: [ bitcoin, lnd ]
image: getumbrel/middleware:v0.1.0
command: ["./wait-for-node-manager.sh", "localhost", "npm", "start"]
logging: *default-logging
restart: on-failure
restart: unless-stopped
network_mode: host
depends_on: [ manager ]
volumes:
- "${HOME}/lnd:/lnd"
- "${HOME}/lnd:/lnd"
- "${HOME}/db/jwt-public-key:/jwt-public-key"
environment:
PORT: "3005"
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 ]
logging: *default-logging
restart: always
volumes:
- "${HOME}/lnd:/lnd"
- "${HOME}/secrets:/secrets"
network_mode: host
JWT_PUBLIC_KEY_FILE: "/jwt-public-key/jwt.pem"
29 changes: 16 additions & 13 deletions nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /etc/nginx/www;
index index.html;

location / {
index index.html;
try_files $uri $uri/ /index.html;
}
listen 80 default_server;
listen [::]:80 default_server;
server_name _;

location /api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
location /api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
proxy_pass http://localhost:3005/;
}
}

location /manager-api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
proxy_pass http://localhost:3006/;
}

location / {
add_header Access-Control-Allow-Origin *;
proxy_pass http://localhost:3004/;
}
}