user3249123423
BTCPay Server on Railway
I'm inexperienced with Docker but i managed to create Dockerfile
# Use a base image with necessary dependencies
FROM ubuntu:latest
# Install required packages and dependencies
RUN apt-get update && apt-get install -y git \
docker \
docker-compose \
&& rm -rf /var/lib/apt/lists/*
# Set the timezone environment variable
ENV TZ=Europe/Berlin
# Create a folder for BTCPay
WORKDIR /BTCPayServer
# Clone BTCPay Server repository
RUN git clone https://github.com/btcpayserver/btcpayserver-docker /btcpayserver-docker
# Set environment variables with default values
ARG BTCPAY_HOST="btcpay.EXAMPLE.com"
ARG NBITCOIN_NETWORK="mainnet"
ARG BTCPAYGEN_CRYPTO1="btc"
ARG BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"
ARG BTCPAYGEN_REVERSEPROXY="nginx"
ARG BTCPAYGEN_LIGHTNING="clightning"
ARG BTCPAY_ENABLE_SSH=true
ENV BTCPAY_HOST=${BTCPAY_HOST} \
NBITCOIN_NETWORK=${NBITCOIN_NETWORK} \
BTCPAYGEN_CRYPTO1=${BTCPAYGEN_CRYPTO1} \
BTCPAYGEN_ADDITIONAL_FRAGMENTS=${BTCPAYGEN_ADDITIONAL_FRAGMENTS} \
BTCPAYGEN_REVERSEPROXY=${BTCPAYGEN_REVERSEPROXY} \
BTCPAYGEN_LIGHTNING=${BTCPAYGEN_LIGHTNING} \
BTCPAY_ENABLE_SSH=${BTCPAY_ENABLE_SSH}
# Set the shell to bash
SHELL ["/bin/bash", "-c"]
# Run setup script using source command
RUN source /btcpayserver-docker/btcpay-setup.sh -i
# Expose necessary ports
EXPOSE 80 443
# Start BTCPay Server
ENTRYPOINT ["/bin/bash", "-c", "/btcpayserver-docker/btcpay-up.sh"]
The Build runs fine but the Deploy fails. Deploy Logs:
/btcpayserver-docker/btcpay-up.sh: line 12: /etc/profile.d/btcpay-env.sh: No such file or directory
Define and run multi-container applications with Docker.
Usage:
docker-compose [-f <arg>...] [--profile <name>...] [options] [--] [COMMAND] [ARGS...]
docker-compose -h|--help
Options:
-f, --file FILE Specify an alternate compose file
(default: docker-compose.yml)
-p, --project-name NAME Specify an alternate project name
15 replies
BTCPay Server on Railway
BTCPay Sever requires you to configure Environment variables before running a Shell script which will then start the Docker container.
Here is some Documentation:
The setup below assumes you want to support Bitcoin, Core Lightning (CLN), HTTPS automatically configured by Nginx. It also enables node pruning, which you can modify or ignore if you have enough disk space for a full node. Finally, your domain is btcpay.EXAMPLE.com should reflect your actual domain name. Environment variables can be tailored to your needs. Some variables require additional storage space. Login as root sudo su - Create a folder for BTCPay mkdir BTCPayServer cd BTCPayServer Clone this repository git clone https://github.com/btcpayserver/btcpayserver-docker cd btcpayserver-docker Run btcpay-setup.sh with the right parameters export BTCPAY_HOST="btcpay.EXAMPLE.com" export NBITCOIN_NETWORK="mainnet" export BTCPAYGEN_CRYPTO1="btc" export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s" export BTCPAYGEN_REVERSEPROXY="nginx" export BTCPAYGEN_LIGHTNING="clightning" export BTCPAY_ENABLE_SSH=true . ./btcpay-setup.sh -i exit btcpay-setup.sh will then: Install Docker Install Docker-Compose Make sure BTCPay starts at reboot via upstart or systemd Setup environment variables to use BTCPay utilities Add BTCPay utilities in /usr/bin Start BTCPay Server
15 replies