mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-18 21:25:06 +01:00
Merge pull request #241 from phillamy/features/env-proxycron
moved proxycron config out of docker-compose.yaml
This commit is contained in:
15
cyphernodeconf_docker/prompters/800_proxycron.js
Normal file
15
cyphernodeconf_docker/prompters/800_proxycron.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
const chalk = require('chalk');
|
||||||
|
|
||||||
|
const name = 'proxycron';
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: function() {
|
||||||
|
return name;
|
||||||
|
},
|
||||||
|
prompts: function( utils ) {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
templates: function( props ) {
|
||||||
|
return [ 'proxycron.env' ];
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -245,9 +245,8 @@ services:
|
|||||||
|
|
||||||
proxycron:
|
proxycron:
|
||||||
image: cyphernode/proxycron:<%= proxycron_version %>
|
image: cyphernode/proxycron:<%= proxycron_version %>
|
||||||
environment:
|
env_file:
|
||||||
- "TX_CONF_URL=proxy:8888/executecallbacks"
|
- .env/proxycron.env
|
||||||
- "OTS_URL=proxy:8888/ots_backoffice"
|
|
||||||
networks:
|
networks:
|
||||||
- cyphernodenet
|
- cyphernodenet
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
2
cyphernodeconf_docker/templates/proxycron/proxycron.env
Normal file
2
cyphernodeconf_docker/templates/proxycron/proxycron.env
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
TX_CONF_URL=proxy:8888/executecallbacks
|
||||||
|
OTS_URL=proxy:8888/ots_backoffice
|
||||||
15
dist/setup.sh
vendored
15
dist/setup.sh
vendored
@@ -127,7 +127,7 @@ sudo_if_required() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modify_permissions() {
|
modify_permissions() {
|
||||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
local directories=("$current_path/.env" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||||
for d in "${directories[@]}"
|
for d in "${directories[@]}"
|
||||||
do
|
do
|
||||||
if [[ -e $d ]]; then
|
if [[ -e $d ]]; then
|
||||||
@@ -139,7 +139,7 @@ modify_permissions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modify_owner() {
|
modify_owner() {
|
||||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
local directories=("$current_path/.env" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$OTSCLIENT_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||||
local user=$(id -u $RUN_AS_USER):$(id -g $RUN_AS_USER)
|
local user=$(id -u $RUN_AS_USER):$(id -g $RUN_AS_USER)
|
||||||
for d in "${directories[@]}"
|
for d in "${directories[@]}"
|
||||||
do
|
do
|
||||||
@@ -474,10 +474,17 @@ install_docker() {
|
|||||||
next
|
next
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $current_path/.env ]; then
|
||||||
|
step " <20>[32mcreate<74>[0m $current_path/.env"
|
||||||
|
sudo_if_required mkdir -p $current_path/.env
|
||||||
|
next
|
||||||
|
fi
|
||||||
|
|
||||||
copy_file $cyphernodeconf_filepath/installer/config.sh $PROXY_DATAPATH/config.sh 1 $SUDO_REQUIRED
|
copy_file $cyphernodeconf_filepath/installer/config.sh $PROXY_DATAPATH/config.sh 1 $SUDO_REQUIRED
|
||||||
copy_file $cyphernodeconf_filepath/cyphernode/info.json $PROXY_DATAPATH/info.json 1 $SUDO_REQUIRED
|
copy_file $cyphernodeconf_filepath/cyphernode/info.json $PROXY_DATAPATH/info.json 1 $SUDO_REQUIRED
|
||||||
copy_file $cyphernodeconf_filepath/postgres/pgpass $PROXY_DATAPATH/pgpass 1 $SUDO_REQUIRED
|
copy_file $cyphernodeconf_filepath/postgres/pgpass $PROXY_DATAPATH/pgpass 1 $SUDO_REQUIRED
|
||||||
sudo_if_required chmod 0600 $PROXY_DATAPATH/pgpass
|
sudo_if_required chmod 0600 $PROXY_DATAPATH/pgpass
|
||||||
|
copy_file $cyphernodeconf_filepath/proxycron/proxycron.env $current_path/.env/proxycron.env 1 $SUDO_REQUIRED
|
||||||
|
|
||||||
if [[ $BITCOIN_INTERNAL == true ]]; then
|
if [[ $BITCOIN_INTERNAL == true ]]; then
|
||||||
if [ ! -d $BITCOIN_DATAPATH ]; then
|
if [ ! -d $BITCOIN_DATAPATH ]; then
|
||||||
@@ -669,7 +676,7 @@ install_docker() {
|
|||||||
|
|
||||||
check_directory_owner() {
|
check_directory_owner() {
|
||||||
# if one directory does not have access rights for $RUN_AS_USER, we echo 1, else we echo 0
|
# if one directory does not have access rights for $RUN_AS_USER, we echo 1, else we echo 0
|
||||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
local directories=("$current_path/.env" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||||
local status=0
|
local status=0
|
||||||
for d in "${directories[@]}"
|
for d in "${directories[@]}"
|
||||||
do
|
do
|
||||||
@@ -773,7 +780,7 @@ sanity_checks_pre_install() {
|
|||||||
if [[ $sudo_reason == 'directories' ]]; then
|
if [[ $sudo_reason == 'directories' ]]; then
|
||||||
echo " [31mor check your data volumes if they have the right owner.[0m"
|
echo " [31mor check your data volumes if they have the right owner.[0m"
|
||||||
echo " [31mThe owner of the following folders should be '$RUN_AS_USER':[0m"
|
echo " [31mThe owner of the following folders should be '$RUN_AS_USER':[0m"
|
||||||
local directories=("$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
local directories=("$current_path/.env" "$BITCOIN_DATAPATH" "$LIGHTNING_DATAPATH" "$PROXY_DATAPATH" "$GATEKEEPER_DATAPATH" "$POSTGRES_DATAPATH" "$LOGS_DATAPATH" "$TRAEFIK_DATAPATH" "$TOR_DATAPATH")
|
||||||
local status=0
|
local status=0
|
||||||
for d in "${directories[@]}"
|
for d in "${directories[@]}"
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user