mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-04 12:04:27 +01:00
apps are now pulled from a different repo
This commit is contained in:
1
dist/apps/sparkwallet/cookie
vendored
1
dist/apps/sparkwallet/cookie
vendored
@@ -1 +0,0 @@
|
||||
cyphernode:sparkwallet:FoeDdQw5yl7pPfqdlGy3OEk/txGqyJjSbVtffhzs7kc=
|
||||
27
dist/apps/sparkwallet/docker-compose.yaml
vendored
27
dist/apps/sparkwallet/docker-compose.yaml
vendored
@@ -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
|
||||
38
dist/apps/sparkwallet/test.sh
vendored
38
dist/apps/sparkwallet/test.sh
vendored
@@ -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
|
||||
14
dist/apps/welcome/config.toml
vendored
14
dist/apps/welcome/config.toml
vendored
@@ -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"
|
||||
25
dist/apps/welcome/docker-compose.yaml
vendored
25
dist/apps/welcome/docker-compose.yaml
vendored
@@ -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
|
||||
38
dist/apps/welcome/test.sh
vendored
38
dist/apps/welcome/test.sh
vendored
@@ -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
|
||||
9
dist/setup.sh
vendored
9
dist/setup.sh
vendored
@@ -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 " [32mclone[0m $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
|
||||
|
||||
Reference in New Issue
Block a user