Browse Source

Updates

feature/dockerfile-arm
Gonzalo Javier Aune 5 years ago
parent
commit
5113a38a7c
  1. 17
      Dockerfile
  2. 4
      Dockerfile-node
  3. 15
      config/app.json
  4. 2
      config/config.json
  5. 13
      docker-compose.yml

17
Dockerfile

@ -7,15 +7,20 @@ ENV GODEBUG netdns=cgo
# Pass a tag, branch or a commit using build-arg. This allows a docker
# image to be built from a specified Git state. The default image
# will use the Git tip of master by default.
# ARG checkout="v0.9.0-beta"
ARG checkout="master"
# Install dependencies and build the binaries.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
gcc \
&& git clone https://github.com/lightningnetwork/lnd /go/src/github.com/lightningnetwork/lnd \
&& cd /go/src/github.com/lightningnetwork/lnd \
RUN apk add --no-cache --update alpine-sdk git make gcc openssh-client
RUN mkdir /root/.ssh/
ADD id_rsa /root/.ssh/id_rsa
RUN touch /root/.ssh/known_hosts
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git clone git@github.com:stakwork/lnd-lean.git /go/src/github.com/lightningnetwork/lnd
# RUN git clone https://github.com/lightningnetwork/lnd /go/src/github.com/lightningnetwork/lnd
RUN cd /go/src/github.com/lightningnetwork/lnd \
&& git checkout $checkout \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"

4
Dockerfile-node

@ -18,9 +18,7 @@ RUN npm install --save-dev sequelize
RUN npm rebuild
COPY . .
USER root
RUN apt-get install telnet
RUN chmod 777 /usr/bin/telnet
RUN chmod -R 777 /relay
RUN chown -R node:node /relay
USER node
RUN npm run tsc
RUN npm run tsc

15
config/app.json

@ -2,7 +2,7 @@
"development": {
"macaroon_location": "/relay/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/relay/.lnd/tls.cert",
"node_ip": "172.21.0.2",
"node_ip": "172.22.0.2",
"lnd_port": "10009",
"node_http_protocol": "http",
"node_http_port": "3000",
@ -13,15 +13,12 @@
"media_host": "memes.sphinx.chat"
},
"production": {
"senza_url": "https://staging.senza.us/api/v2/",
"macaroon_location": "/home/ubuntu/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/home/ubuntu/.lnd/tls.cert",
"lnd_log_location": "/home/ubuntu/.lnd/logs/bitcoin/mainnet/lnd.log",
"lncli_location": "/home/ubuntu/go/bin",
"node_ip": "localhost",
"node_http_protocol": "http",
"node_http_port": "80",
"macaroon_location": "/relay/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
"tls_location": "/relay/.lnd/tls.cert",
"node_ip": "172.22.0.2",
"lnd_port": "10009",
"node_http_protocol": "http",
"node_http_port": "3000",
"hub_api_url": "http://hub.sphinx.chat/api/v1",
"hub_url": "http://hub.sphinx.chat/ping",
"hub_invite_url": "http://hub.sphinx.chat/invites",

2
config/config.json

@ -13,6 +13,6 @@
},
"production": {
"dialect": "sqlite",
"storage": "/home/ubuntu/sphinx.db"
"storage": "./sphinx.db"
}
}

13
docker-compose.yml

@ -13,7 +13,10 @@ services:
- "9735:9735"
- "10009:10009"
- "8080:8080"
command: 'lnd --alias=gonza-ireland --restlisten=0.0.0.0:8080 --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --bitcoin.mainnet --bitcoin.active --bitcoin.node=neutrino'
command: 'lnd --accept-keysend'
# networks:
# - lnd_relay
# tty: true
node_server:
build:
context: .
@ -21,13 +24,15 @@ services:
depends_on:
- lnd
volumes:
- .:/relay:cached
- .:/relay
- .lnd/:/relay/.lnd
- node_modules:/relay/node_modules
ports:
- "3000:3000"
tty: true
# command: "npm start"
# tty: true
command: "npm start"
# networks:
# - lnd_relay
environment:
- PORT=3000
- NODE_IP=51.37.119.104

Loading…
Cancel
Save