btcpayserver / btcpayserver-docker

Docker resources for hosting BTCPayServer easily
MIT License
584 stars 358 forks source link

Error [Errno 2] No such file or directory: '...Generated/docker-compose.generated.yml' #424

Open alexnoxx opened 3 years ago

alexnoxx commented 3 years ago

Hello guys, I am installing BTCPayserver on a virtual machine with centos 8.

When I run the following statement:

export BTCPAY_HOST="btcpayserver.mydomain.com"
export BTCPAYGEN_SUBNAME="nodobtcpay"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2="doge"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-more-memory;opt-add-btcqbo;opt-add-woocommerce;opt-add-tor;opt-add-btctransmuter;opt-add-configurator"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAY_ENABLE_SSH=true
export LETSENCRYPT_EMAIL="myemailaccount@gmail.com"
export REVERSEPROXY_HTTP_PORT=80
export REVERSEPROXY_HTTPS_PORT=443
export REVERSEPROXY_DEFAULT_HOST=443
export TOR_RELAY_NICKNAME="testnetwork"
export TOR_RELAY_EMAIL="myemailaccount@gmail.com"
export WOOCOMMERCE_HOST="shop.mydomain.com"
. ./btcpay-setup.sh -i

I get the following error:

-------SETUP-----------
Parameters passed:
BTCPAY_PROTOCOL:https
BTCPAY_HOST:btcpayserver.mydomain.com
BTCPAY_ADDITIONAL_HOSTS:
REVERSEPROXY_HTTP_PORT:80
REVERSEPROXY_HTTPS_PORT:443
REVERSEPROXY_DEFAULT_HOST:443
LIBREPATRON_HOST:
ZAMMAD_HOST:
WOOCOMMERCE_HOST:shop.mydomain.com
BTCTRANSMUTER_HOST:
BTCPAY_ENABLE_SSH:true
BTCPAY_HOST_SSHKEYFILE:
LETSENCRYPT_EMAIL:myemailaccount@gmail.com
NBITCOIN_NETWORK:mainnet
LIGHTNING_ALIAS:
BTCPAYGEN_CRYPTO1:btc
BTCPAYGEN_CRYPTO2:doge
BTCPAYGEN_CRYPTO3:
BTCPAYGEN_CRYPTO4:
BTCPAYGEN_CRYPTO5:
BTCPAYGEN_CRYPTO6:
BTCPAYGEN_CRYPTO7:
BTCPAYGEN_CRYPTO8:
BTCPAYGEN_CRYPTO9:
BTCPAYGEN_REVERSEPROXY:nginx
BTCPAYGEN_LIGHTNING:none
BTCPAYGEN_ADDITIONAL_FRAGMENTS:opt-more-memory;opt-add-btcqbo;opt-add-woocommerce;opt-add-tor;opt-add-btctransmuter;opt-add-configurator
BTCPAYGEN_EXCLUDE_FRAGMENTS:
BTCPAY_IMAGE:
ACME_CA_URI:production
TOR_RELAY_NICKNAME: protossnetwork
TOR_RELAY_EMAIL: myemailaccount@gmail.com
PIHOLE_SERVERIP:
----------------------
Additional exported variables:
BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml
BTCPAY_BASE_DIRECTORY=/root/BTCPayServer
BTCPAY_ENV_FILE=/root/BTCPayServer/.env
BTCPAYGEN_OLD_PREGEN=false
BTCPAY_SSHKEYFILE=/datadir/host_id_rsa
BTCPAY_SSHAUTHORIZEDKEYS=/datadir/host_authorized_keys
BTCPAY_HOST_SSHAUTHORIZEDKEYS:/root/.ssh/authorized_keys
BTCPAY_SSHTRUSTEDFINGERPRINTS:
BTCPAY_CRYPTOS:btc;doge
BTCPAY_ANNOUNCEABLE_HOST:btcpayserver.mydomain.com
----------------------

BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh

BTCPay Server docker-compose parameters saved in /root/BTCPayServer/.env

Using default tag: latest
latest: Pulling from btcpayserver/docker-compose-generator
Digest: sha256:ed69f844a6f640cd95d4816af6f054651e7ddbe069a72be0a299c4e1c69c6cfa
Status: Image is up to date for btcpayserver/docker-compose-generator:latest
docker.io/btcpayserver/docker-compose-generator:latest
Crypto: btc, doge
Lightning: none
ReverseProxy: nginx
Generating /app/Generated/docker-compose.nodobtcpay.yml
Selected fragments:
        nginx
        btcpayserver
        bitcoin
        dogecoin
        opt-more-memory
        opt-add-btcqbo
        opt-add-woocommerce
        opt-add-tor
        opt-add-btctransmuter
        opt-add-configurator
        btcpayserver-nginx
        postgres
        nbxplorer
        nginx-https
Generated /app/Generated/pull-images.sh
Generated /app/Generated/save-images.sh
Generated /app/Generated/docker-compose.nodobtcpay.yml

Adding btcpayserver.service to systemd
BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service

BTCPay Server starting... this can take 5 to 10 minutes...
BTCPay Server started
**ERROR:** .FileNotFoundError: [Errno 2] No such file or directory: '/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml'
**ERROR:** .FileNotFoundError: [Errno 2] No such file or directory: '/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml'

what could be happening?

Regards,

Alex

janhn commented 3 years ago

The support for BTCPAYGEN_SUBNAME isn't complete in the setup script.

Using export BTCPAYGEN_SUBNAME="nodobtcpay" means the generated docker-compose file should be named docker-compose.nodobtcpay.yml, yet the output lists:

BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml

then the generator has it right:

Generating /app/Generated/docker-compose.nodobtcpay.yml

The incorrect filename ends up also in /etc/profile.d/btcpay-env.sh and things go wrong.

The fix might be something like subname.txt

alexnoxx commented 3 years ago

Thanks for the reply. I understand that one of the solutions is not to put the subname to use the default generator and the other solution is by modifying the parameters located in the file: /btcpay-env.sh?.

In the case of placing a value of subname, the generator would enter the "else" of the conditional applying the instruction:

+ BTCPAY_DOCKER_COMPOSE="$(pwd)/Generated/docker-compose.${BTCPAY_SUBNAME:-generated}.yml"

So the new path should be:

BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.nodobtcpay.yml

Why is this route not updated and the default route is still displayed? Should I replace it with the following path ?:

BTCPAY_DOCKER_COMPOSE=/app/Generated/docker-compose.nodobtcpay.yml

Thanks