mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-11 16:09:16 +00:00
Change LndBoss install process
This commit is contained in:
parent
4661e29ee8
commit
7eafde8532
|
@ -9,18 +9,21 @@ After=www.service docker_images.service
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/mynode/lndboss
|
WorkingDirectory=/opt/mynode/lndboss
|
||||||
|
|
||||||
|
EnvironmentFile=-/mnt/hdd/mynode/lndboss/env
|
||||||
|
|
||||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||||
ExecStartPre=+/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/pre_lndboss.sh; fi'
|
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/pre_lndboss.sh; fi'
|
||||||
ExecStart=/usr/bin/docker run --rm \
|
ExecStart=/usr/bin/docker run --rm \
|
||||||
--name lndboss \
|
--name lndboss \
|
||||||
--publish 8055:8055 \
|
--publish 8055:8055 \
|
||||||
--env BOS_DATA_PATH="/root/.bosgui" \
|
--env BOS_DATA_PATH="/.bosgui" \
|
||||||
--env LNDBOSS_DIRECTORY="/root/.bosgui" \
|
--env LNDBOSS_DIRECTORY="/.bosgui" \
|
||||||
--env NODE_ENV="production" \
|
--env NODE_ENV="production" \
|
||||||
--env PORT="8055" \
|
--env PORT="8055" \
|
||||||
--env BOS_DEFAULT_LND_SOCKET="host.docker.internal:10009" \
|
--env BOS_DEFAULT_LND_SOCKET="host.docker.internal:10009" \
|
||||||
--volume /mnt/hdd/mynode/lndboss/:/root/.bosgui \
|
--user ${UID}:${GID} \
|
||||||
--volume /mnt/hdd/mynode/lnd/:/root/.lnd \
|
--volume /mnt/hdd/mynode/lndboss:/.bosgui \
|
||||||
|
--volume /mnt/hdd/mynode/lnd:/.lnd:ro \
|
||||||
--add-host=host.docker.internal:host-gateway \
|
--add-host=host.docker.internal:host-gateway \
|
||||||
lndboss
|
lndboss
|
||||||
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/post_lndboss.sh; fi'
|
ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_lndboss.sh ]; then /bin/bash /usr/bin/service_scripts/post_lndboss.sh; fi'
|
||||||
|
|
|
@ -14,15 +14,20 @@ echo "==================== INSTALLING APP ===================="
|
||||||
|
|
||||||
# Remove old containers
|
# Remove old containers
|
||||||
docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'lndboss') || true
|
docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'lndboss') || true
|
||||||
|
docker rmi lndboss || true
|
||||||
|
|
||||||
|
# Pull latest image and tag latest
|
||||||
|
docker pull niteshbalusu/lndboss:v2.16.0
|
||||||
|
docker tag niteshbalusu/lndboss:v2.16.0 lndboss
|
||||||
|
|
||||||
# Build docker container
|
# Build docker container
|
||||||
if [ "$DEVICE_ARCH" = "x86_64" ]; then
|
#if [ "$DEVICE_ARCH" = "x86_64" ]; then
|
||||||
docker build -t lndboss .
|
# docker build -t lndboss .
|
||||||
elif [ "$DEVICE_ARCH" = "aarch64" ]; then
|
#elif [ "$DEVICE_ARCH" = "aarch64" ]; then
|
||||||
docker build . -t lndboss -f arm64.Dockerfile
|
# docker build . -t lndboss -f arm64.Dockerfile
|
||||||
else
|
#else
|
||||||
echo "THIS ARCHITECTURE IS NOT SUPPORTED FOR LndBoss"
|
# echo "THIS ARCHITECTURE IS NOT SUPPORTED FOR LndBoss"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo "================== DONE INSTALLING APP ================="
|
echo "================== DONE INSTALLING APP ================="
|
|
@ -11,4 +11,25 @@ if [ -f /home/bitcoin/.mynode/.hashedpw_bcrypt ]; then
|
||||||
"passwordHash": "$HASH_BCRYPT"
|
"passwordHash": "$HASH_BCRYPT"
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p /mnt/hdd/mynode/lndboss/local
|
||||||
|
cat << EOF > /mnt/hdd/mynode/lndboss/config.json
|
||||||
|
{
|
||||||
|
"default_saved_node": "local"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cat << EOF > /mnt/hdd/mynode/lndboss/local/credentials.json
|
||||||
|
{
|
||||||
|
"cert_path": "/.lnd/tls.cert",
|
||||||
|
"macaroon_path": "/.lnd/data/chain/bitcoin/mainnet/admin.macaroon",
|
||||||
|
"socket": "host.docker.internal:10009"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# Create env file
|
||||||
|
MY_UID=$(id -u)
|
||||||
|
MY_GID=$(id -g)
|
||||||
|
echo "UID=$MY_UID" > /mnt/hdd/mynode/lndboss/env
|
||||||
|
echo "GID=$MY_GID" >> /mnt/hdd/mynode/lndboss/env
|
Loading…
Reference in New Issue
Block a user