mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-17 12:45:22 +01:00
Fixed installation directory problems
This commit is contained in:
38
build.sh
38
build.sh
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
TRACING=1
|
TRACING=1
|
||||||
|
|
||||||
|
# CYPHERNODE VERSION "v0.1"
|
||||||
|
CONF_VERSION="v0.1"
|
||||||
|
GATEKEEPER_VERSION="v0.1"
|
||||||
|
PROXY_VERSION="v0.1"
|
||||||
|
PROXYCRON_VERSION="v0.1"
|
||||||
|
OTSCLIENT_VERSION="v0.1"
|
||||||
|
PYCOIN_VERSION="v0.1"
|
||||||
|
BITCOIN_VERSION="v0.17.0"
|
||||||
|
LIGHTNING_VERSION="v0.6.2"
|
||||||
|
GRAFANA_VERSION="v0.1"
|
||||||
|
|
||||||
trace()
|
trace()
|
||||||
{
|
{
|
||||||
if [ -n "${TRACING}" ]; then
|
if [ -n "${TRACING}" ]; then
|
||||||
@@ -38,6 +49,7 @@ build_docker_images() {
|
|||||||
local bitcoin_dockerfile=Dockerfile.amd64
|
local bitcoin_dockerfile=Dockerfile.amd64
|
||||||
local clightning_dockerfile=Dockerfile.amd64
|
local clightning_dockerfile=Dockerfile.amd64
|
||||||
local proxy_dockerfile=Dockerfile.amd64
|
local proxy_dockerfile=Dockerfile.amd64
|
||||||
|
local grafana_dockerfile=Dockerfile.amd64
|
||||||
|
|
||||||
# compat mode for SatoshiPortal repo
|
# compat mode for SatoshiPortal repo
|
||||||
# TODO: add more mappings?
|
# TODO: add more mappings?
|
||||||
@@ -45,31 +57,23 @@ build_docker_images() {
|
|||||||
bitcoin_dockerfile="Dockerfile.arm32v6"
|
bitcoin_dockerfile="Dockerfile.arm32v6"
|
||||||
clightning_dockerfile="Dockerfile.arm32v6"
|
clightning_dockerfile="Dockerfile.arm32v6"
|
||||||
proxy_dockerfile="Dockerfile.arm32v6"
|
proxy_dockerfile="Dockerfile.arm32v6"
|
||||||
|
grafana_dockerfile="Dockerfile.arm32v6"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trace "Creating cyphernodeconf image"
|
trace "Creating cyphernodeconf image"
|
||||||
build_docker_image install/ cyphernode/cyphernodeconf:$CN_VERSION
|
build_docker_image install/ cyphernode/cyphernodeconf:$CONF_VERSION
|
||||||
|
|
||||||
trace "Creating SatoshiPortal images"
|
trace "Creating SatoshiPortal images"
|
||||||
build_docker_image install/SatoshiPortal/dockers/bitcoin-core cyphernode/bitcoin:$BC_VERSION $bitcoin_dockerfile
|
build_docker_image install/SatoshiPortal/dockers/bitcoin-core cyphernode/bitcoin:$BITCOIN_VERSION $bitcoin_dockerfile
|
||||||
build_docker_image install/SatoshiPortal/dockers/c-lightning cyphernode/clightning:$CL_VERSION $clightning_dockerfile
|
build_docker_image install/SatoshiPortal/dockers/c-lightning cyphernode/clightning:$LIGHTNING_VERSION $clightning_dockerfile
|
||||||
|
|
||||||
trace "Creating cyphernode images"
|
trace "Creating cyphernode images"
|
||||||
build_docker_image api_auth_docker/ cyphernode/gatekeeper:$CN_VERSION
|
build_docker_image api_auth_docker/ cyphernode/gatekeeper:$GATEKEEPER_VERSION
|
||||||
build_docker_image proxy_docker/ cyphernode/proxy:$CN_VERSION $proxy_dockerfile
|
build_docker_image proxy_docker/ cyphernode/proxy:$PROXY_VERSION $proxy_dockerfile
|
||||||
build_docker_image cron_docker/ cyphernode/proxycron:$CN_VERSION
|
build_docker_image cron_docker/ cyphernode/proxycron:$PROXYCRON_VERSION
|
||||||
build_docker_image pycoin_docker/ cyphernode/pycoin:$CN_VERSION
|
build_docker_image pycoin_docker/ cyphernode/pycoin:$PYCOIN_VERSION
|
||||||
build_docker_image otsclient_docker/ cyphernode/otsclient:$CN_VERSION
|
build_docker_image otsclient_docker/ cyphernode/otsclient:$OTSCLIENT_VERSION
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# CYPHERNODE VERSION
|
|
||||||
GATEKEEPER_VERSION="latest"
|
|
||||||
PROXY_VERSION="latest"
|
|
||||||
PROXYCRON_VERSION="latest"
|
|
||||||
OTSCLIENT_VERSION="latest"
|
|
||||||
PYCOIN_VERSION="latest"
|
|
||||||
BITCOIN_VERSION="latest"
|
|
||||||
LIGHTNING_VERSION="latest"
|
|
||||||
|
|
||||||
build_docker_images
|
build_docker_images
|
||||||
|
|||||||
9
dist/setup.sh
vendored
9
dist/setup.sh
vendored
@@ -183,6 +183,8 @@ configure() {
|
|||||||
# configure features of cyphernode
|
# configure features of cyphernode
|
||||||
docker run -v $current_path:/data \
|
docker run -v $current_path:/data \
|
||||||
-e DEFAULT_USER=$USER \
|
-e DEFAULT_USER=$USER \
|
||||||
|
-e DEFAULT_DATADIR_BASE=$HOME \
|
||||||
|
-e SETUP_DIR=$SETUP_DIR \
|
||||||
-e DEFAULT_CERT_HOSTNAME=$(hostname) \
|
-e DEFAULT_CERT_HOSTNAME=$(hostname) \
|
||||||
-e VERSION_OVERRIDE=$VERSION_OVERRIDE \
|
-e VERSION_OVERRIDE=$VERSION_OVERRIDE \
|
||||||
-e GATEKEEPER_VERSION=$GATEKEEPER_VERSION \
|
-e GATEKEEPER_VERSION=$GATEKEEPER_VERSION \
|
||||||
@@ -551,6 +553,11 @@ check_bitcoind() {
|
|||||||
echo 0
|
echo 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
realpath() {
|
||||||
|
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sanity_checks() {
|
sanity_checks() {
|
||||||
|
|
||||||
echo " [32mcheck[0m requirements."
|
echo " [32mcheck[0m requirements."
|
||||||
@@ -649,6 +656,8 @@ PYCOIN_VERSION="v0.1"
|
|||||||
BITCOIN_VERSION="v0.17.0"
|
BITCOIN_VERSION="v0.17.0"
|
||||||
LIGHTNING_VERSION="v0.6.2"
|
LIGHTNING_VERSION="v0.6.2"
|
||||||
|
|
||||||
|
SETUP_DIR=$(dirname $(realpath $0))
|
||||||
|
|
||||||
# trap ctrl-c and call ctrl_c()
|
# trap ctrl-c and call ctrl_c()
|
||||||
trap ctrl_c INT
|
trap ctrl_c INT
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ module.exports = class extends Generator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _initConfig() {
|
async _initConfig() {
|
||||||
|
this.defaultDataDirBase = process.env.DEFAULT_DATADIR_BASE;
|
||||||
|
this.setupDir = process.env.SETUP_DIR;
|
||||||
const versionOverride = process.env.VERSION_OVERRIDE==='true';
|
const versionOverride = process.env.VERSION_OVERRIDE==='true';
|
||||||
if( fs.existsSync(this.destinationPath('config.7z')) ) {
|
if( fs.existsSync(this.destinationPath('config.7z')) ) {
|
||||||
let r = {};
|
let r = {};
|
||||||
|
|||||||
@@ -37,16 +37,20 @@ module.exports = {
|
|||||||
default: utils._getDefault( 'gatekeeper_datapath' ),
|
default: utils._getDefault( 'gatekeeper_datapath' ),
|
||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
name: "/var/run/cyphernode/gatekeeper (needs sudo and "+chalk.red('incompatible with OSX')+")",
|
name: utils.setupDir+"/cyphernode/gatekeeper",
|
||||||
value: "/var/run/cyphernode/gatekeeper"
|
value: utils.setupDir+"/cyphernode/gatekeeper"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/.cyphernode/gatekeeper",
|
name: utils.defaultDataDirBase+"/cyphernode/gatekeeper",
|
||||||
value: "~/.cyphernode/gatekeeper"
|
value: utils.defaultDataDirBase+"/cyphernode/gatekeeper"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/gatekeeper",
|
name: utils.defaultDataDirBase+"/.cyphernode/gatekeeper",
|
||||||
value: "~/gatekeeper"
|
value: utils.defaultDataDirBase+"/.cyphernode/gatekeeper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: utils.defaultDataDirBase+"/gatekeeper",
|
||||||
|
value: utils.defaultDataDirBase+"/gatekeeper"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Custom path",
|
name: "Custom path",
|
||||||
@@ -71,16 +75,20 @@ module.exports = {
|
|||||||
default: utils._getDefault( 'proxy_datapath' ),
|
default: utils._getDefault( 'proxy_datapath' ),
|
||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
name: "/var/run/cyphernode/proxy (needs sudo and "+chalk.red('incompatible with OSX')+")",
|
name: utils.setupDir+"/cyphernode/proxy",
|
||||||
value: "/var/run/cyphernode/proxy"
|
value: utils.setupDir+"/cyphernode/proxy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/.cyphernode/proxy",
|
name: utils.defaultDataDirBase+"/cyphernode/proxy",
|
||||||
value: "~/.cyphernode/proxy"
|
value: utils.defaultDataDirBase+"/cyphernode/proxy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/proxy",
|
name: utils.defaultDataDirBase+"/.cyphernode/proxy",
|
||||||
value: "~/proxy"
|
value: utils.defaultDataDirBase+"/.cyphernode/proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: utils.defaultDataDirBase+"/proxy",
|
||||||
|
value: utils.defaultDataDirBase+"/proxy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Custom path",
|
name: "Custom path",
|
||||||
@@ -105,16 +113,20 @@ module.exports = {
|
|||||||
default: utils._getDefault( 'bitcoin_datapath' ),
|
default: utils._getDefault( 'bitcoin_datapath' ),
|
||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
name: "/var/run/cyphernode/bitcoin (needs sudo and "+chalk.red('incompatible with OSX')+")",
|
name: utils.setupDir+"/cyphernode/bitcoin",
|
||||||
value: "/var/run/cyphernode/bitcoin"
|
value: utils.setupDir+"/cyphernode/bitcoin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/.cyphernode/bitcoin",
|
name: utils.defaultDataDirBase+"/cyphernode/bitcoin",
|
||||||
value: "~/.cyphernode/bitcoin"
|
value: utils.defaultDataDirBase+"/cyphernode/bitcoin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/bitcoin",
|
name: utils.defaultDataDirBase+"/.cyphernode/bitcoin",
|
||||||
value: "~/bitcoin"
|
value: utils.defaultDataDirBase+"/.cyphernode/bitcoin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: utils.defaultDataDirBase+"/bitcoin",
|
||||||
|
value: utils.defaultDataDirBase+"/bitcoin"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Custom path",
|
name: "Custom path",
|
||||||
@@ -139,16 +151,20 @@ module.exports = {
|
|||||||
default: utils._getDefault( 'lightning_datapath' ),
|
default: utils._getDefault( 'lightning_datapath' ),
|
||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
name: "/var/run/cyphernode/lightning (needs sudo - "+chalk.red('incompatible with OSX')+")",
|
name: utils.setupDir+"/cyphernode/lightning",
|
||||||
value: "/var/run/cyphernode/lightning"
|
value: utils.setupDir+"/cyphernode/lightning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/.cyphernode/lightning",
|
name: utils.defaultDataDirBase+"/cyphernode/lightning",
|
||||||
value: "~/.cyphernode/lightning"
|
value: utils.defaultDataDirBase+"/cyphernode/lightning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/lightning",
|
name: utils.defaultDataDirBase+"/.cyphernode/lightning",
|
||||||
value: "~/lightning"
|
value: utils.defaultDataDirBase+"/.cyphernode/lightning"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: utils.defaultDataDirBase+"/lightning",
|
||||||
|
value: utils.defaultDataDirBase+"/lightning"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Custom path",
|
name: "Custom path",
|
||||||
@@ -173,16 +189,20 @@ module.exports = {
|
|||||||
default: utils._getDefault( 'otsclient_datapath' ),
|
default: utils._getDefault( 'otsclient_datapath' ),
|
||||||
choices: [
|
choices: [
|
||||||
{
|
{
|
||||||
name: "/var/run/cyphernode/otsclient (needs sudo and "+chalk.red('incompatible with OSX')+")",
|
name: utils.setupDir+"/cyphernode/otsclient",
|
||||||
value: "/var/run/cyphernode/otsclient"
|
value: utils.setupDir+"/cyphernode/otsclient"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/.cyphernode/otsclient",
|
name: utils.defaultDataDirBase+"/cyphernode/otsclient",
|
||||||
value: "~/.cyphernode/otsclient"
|
value: utils.defaultDataDirBase+"/cyphernode/otsclient"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "~/otsclient",
|
name: utils.defaultDataDirBase+"/.cyphernode/otsclient",
|
||||||
value: "~/otsclient"
|
value: utils.defaultDataDirBase+"/.cyphernode/otsclient"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: utils.defaultDataDirBase+"/otsclient",
|
||||||
|
value: utils.defaultDataDirBase+"/otsclient"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Custom path",
|
name: "Custom path",
|
||||||
|
|||||||
Reference in New Issue
Block a user