diff --git a/dist/apps/sparkwallet/cookie b/dist/apps/sparkwallet/cookie deleted file mode 100644 index c9558e6..0000000 --- a/dist/apps/sparkwallet/cookie +++ /dev/null @@ -1 +0,0 @@ -cyphernode:sparkwallet:FoeDdQw5yl7pPfqdlGy3OEk/txGqyJjSbVtffhzs7kc= diff --git a/dist/apps/sparkwallet/docker-compose.yaml b/dist/apps/sparkwallet/docker-compose.yaml deleted file mode 100644 index af35289..0000000 --- a/dist/apps/sparkwallet/docker-compose.yaml +++ /dev/null @@ -1,27 +0,0 @@ -version: "3" - -services: - cyphernode_sparkwallet: - command: --no-tls - image: cyphernode/sparkwallet:v0.2.5 - volumes: - - "$LIGHTNING_DATAPATH/:/etc/lightning" - - "$APP_SCRIPT_PATH/cookie:/data/spark/cookie" - - "$GATEKEEPER_DATAPATH/htpasswd:/htpasswd/htpasswd" - labels: - - "traefik.docker.network=cyphernodeappsnet" - - "traefik.frontend.rule=ReplacePathRegex: ^/sparkwallet(.*) $$1" - - "traefik.frontend.passHostHeader=true" - - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" - - "traefik.frontend.headers.customRequestHeaders=X-Access:FoeDdQw5yl7pPfqdlGy3OEk/txGqyJjSbVtffhzs7kc=" - - "traefik.enable=true" - - "traefik.port=9737" - networks: - - cyphernodenet - - cyphernodeappsnet - restart: always -networks: - cyphernodeappsnet: - external: true - cyphernodenet: - external: true \ No newline at end of file diff --git a/dist/apps/sparkwallet/test.sh b/dist/apps/sparkwallet/test.sh deleted file mode 100644 index 8c8a142..0000000 --- a/dist/apps/sparkwallet/test.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -timeout_feature() { - local interval=10 - local totaltime=60 - local testwhat=${1} - local returncode - local endtime=$(($(date +%s) + ${totaltime})) - - while : - do - eval ${testwhat} - returncode=$? - - # If no error or 2 minutes passed, we get out of this loop - ([ "${returncode}" -eq "0" ] || [ $(date +%s) -gt ${endtime} ]) && break - - printf "\e[1;31mMaybe it's too early, I'll retry every ${interval} seconds for $((${totaltime} / 60)) minutes ($((${endtime} - $(date +%s))) seconds left).\e[1;0m" - - sleep ${interval} - done - - return ${returncode} -} - -do_test() { - local rc - rc=$(curl -k -s -o /dev/null -w "%{http_code}" https://localhost/sparkwallet) - [ "${rc}" -ne "401" ] && return 400 - return 0 -} - -timeout_feature do_test -returncode=$? - -# return 0: tests cool -# return 1: tests failed -return $returncode diff --git a/dist/apps/welcome/config.toml b/dist/apps/welcome/config.toml deleted file mode 100644 index 9d024b7..0000000 --- a/dist/apps/welcome/config.toml +++ /dev/null @@ -1,14 +0,0 @@ -[server] -listen = "0.0.0.0:8080" -index_template = "templates/index.html" -path_prefix = "/welcome" - -[gatekeeper] -status_url = "https://gatekeeper/v0/getblockchaininfo" -installation_info_url = "https://gatekeeper/s/stats/installation.json" -config_archive_url = "https://gatekeeper/s/stats/config.7z" -certs_url = "https://gatekeeper/s/stats/client.7z" - -key_label = "000" -key_file = "/data/keys.properties" -cert_file = "/data/cert.pem" diff --git a/dist/apps/welcome/docker-compose.yaml b/dist/apps/welcome/docker-compose.yaml deleted file mode 100644 index ab22517..0000000 --- a/dist/apps/welcome/docker-compose.yaml +++ /dev/null @@ -1,25 +0,0 @@ -version: "3" - -services: - cyphernode_welcome: - environment: - - "TRACING=1" - image: cyphernode/app_welcome:v0.2.0-rc.2 - volumes: - - "$GATEKEEPER_DATAPATH/certs/cert.pem:/data/cert.pem" - - "$GATEKEEPER_DATAPATH/keys.properties:/data/keys.properties" - - "$APP_SCRIPT_PATH/config.toml:/data/config.toml" - - "$GATEKEEPER_DATAPATH/htpasswd:/htpasswd/htpasswd" - networks: - - cyphernodeappsnet - restart: always - labels: - - "traefik.docker.network=cyphernodeappsnet" - - "traefik.frontend.rule=PathPrefix:/welcome; PathPrefixStrip:/welcome" - - "traefik.frontend.passHostHeader=true" - - "traefik.enable=true" - - "traefik.port=8080" - - "traefik.frontend.auth.basic.usersFile=/htpasswd/htpasswd" -networks: - cyphernodeappsnet: - external: true diff --git a/dist/apps/welcome/test.sh b/dist/apps/welcome/test.sh deleted file mode 100644 index 0f10641..0000000 --- a/dist/apps/welcome/test.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -timeout_feature() { - local interval=10 - local totaltime=60 - local testwhat=${1} - local returncode - local endtime=$(($(date +%s) + ${totaltime})) - - while : - do - eval ${testwhat} - returncode=$? - - # If no error or 2 minutes passed, we get out of this loop - ([ "${returncode}" -eq "0" ] || [ $(date +%s) -gt ${endtime} ]) && break - - printf "\e[1;31mMaybe it's too early, I'll retry every ${interval} seconds for $((${totaltime} / 60)) minutes ($((${endtime} - $(date +%s))) seconds left).\e[1;0m" - - sleep ${interval} - done - - return ${returncode} -} - -do_test() { - local rc - rc=$(curl -k -s -o /dev/null -w "%{http_code}" https://localhost/welcome) - [ "${rc}" -ne "401" ] && return 400 - return 0 -} - -timeout_feature do_test -returncode=$? - -# return 0: tests cool -# return 1: tests failed -return $returncode diff --git a/dist/setup.sh b/dist/setup.sh index 0be8a75..658d9f2 100755 --- a/dist/setup.sh +++ b/dist/setup.sh @@ -684,6 +684,14 @@ sanity_checks_pre_install() { fi } +install_apps() { + if [ ! -d "$current_path/apps" ]; then + local apps_repo="https://github.com/SatoshiPortal/cypherapps.git" + echo " clone $apps_repo into apps" + docker run --rm -v "$current_path":/git alpine/git clone "$apps_repo" apps > /dev/null 2>&1 + fi +} + install() { if [[ ''$INSTALLER_MODE == 'none' ]]; then echo "Skipping installation phase" @@ -794,6 +802,7 @@ if [[ $INSTALL == 1 ]]; then install modify_owner modify_permissions + install_apps fi if [[ $AUTOSTART == 1 ]]; then