Skip to content
Open
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
46 changes: 31 additions & 15 deletions rootfs/standard/usr/share/mynode_apps/albyhub/albyhub.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,36 @@ WorkingDirectory=/opt/mynode/albyhub

ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/bin/bash -c 'if [ -f /usr/bin/service_scripts/pre_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/pre_albyhub.sh; fi'
ExecStart=docker run --rm \
--name albyhub \
--publish 3040:8080 \
--add-host=host.docker.internal:host-gateway \
--volume /mnt/hdd/mynode/albyhub:/data \
--volume /mnt/hdd/mynode/lnd/tls.cert:/lnd/tls.cert \
--volume /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon:/lnd/admin.macaroon \
--env WORK_DIR="/data" \
--env LN_BACKEND_TYPE="LND" \
--env LND_ADDRESS="host.docker.internal:10009" \
--env LND_CERT_FILE="/lnd/tls.cert" \
--env LND_MACAROON_FILE="/lnd/admin.macaroon" \
--env ENABLE_ADVANCED_SETUP=false \
albyhub

ExecStart=/bin/bash -c 'if [ ! -f /mnt/hdd/mynode/settings/albyhub_conf_phoenixd ]; then \
docker run --rm \
--name albyhub \
--publish 3040:8080 \
--add-host=host.docker.internal:host-gateway \
--volume /mnt/hdd/mynode/albyhub:/data \
--volume /mnt/hdd/mynode/lnd/tls.cert:/lnd/tls.cert \
--volume /mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon:/lnd/admin.macaroon \
--env WORK_DIR="/data" \
--env LN_BACKEND_TYPE=LND \
--env LND_ADDRESS="host.docker.internal:10009" \
--env LND_CERT_FILE="/lnd/tls.cert" \
--env LND_MACAROON_FILE="/lnd/admin.macaroon" \
--env ENABLE_ADVANCED_SETUP=false \
albyhub; \
else \
docker run --rm \
--name albyhub \
--publish 3040:8080 \
--add-host=host.docker.internal:host-gateway \
--volume /mnt/hdd/mynode/albyhub:/data \
--env WORK_DIR="/data" \
--env LN_BACKEND_TYPE=PHOENIX \
--env PHOENIXD_ADDRESS="http://172.17.0.1:9740" \
--env PHOENIXD_AUTHORIZATION=$(grep -E "^http-password=" /mnt/hdd/mynode/phoenixd/phoenix.conf | cut -d"=" -f2) \
--env ENABLE_ADVANCED_SETUP=false \
albyhub; \
fi'

ExecStartPost=/bin/bash -c 'if [ -f /usr/bin/service_scripts/post_albyhub.sh ]; then /bin/bash /usr/bin/service_scripts/post_albyhub.sh; fi'
ExecStop=docker stop -t 2 albyhub

Expand All @@ -37,4 +53,4 @@ RestartSec=60
SyslogIdentifier=albyhub

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target