mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 05:09:22 +00:00
Run Bitcoin, Monero nodes on Alpine
While prior this didn't work well, presumably due to stack size limitations, a shell script is included to raise the default stack size limit. This should be tried again.
This commit is contained in:
@@ -29,7 +29,7 @@ RUN tar xzvf bitcoin-${BITCOIN_VERSION}-$(uname -m)-linux-gnu.tar.gz
|
||||
RUN mv bitcoin-${BITCOIN_VERSION}/bin/bitcoind .
|
||||
"#;
|
||||
|
||||
let setup = mimalloc(Os::Debian) + DOWNLOAD_BITCOIN;
|
||||
let setup = mimalloc(Os::Alpine) + DOWNLOAD_BITCOIN;
|
||||
|
||||
let run_bitcoin = format!(
|
||||
r#"
|
||||
@@ -43,7 +43,7 @@ CMD ["/run.sh"]
|
||||
network.label()
|
||||
);
|
||||
|
||||
let run = os(Os::Debian, "", "bitcoin") + &run_bitcoin;
|
||||
let run = os(Os::Alpine, "", "bitcoin") + &run_bitcoin;
|
||||
let res = setup + &run;
|
||||
|
||||
let mut bitcoin_path = orchestration_path.to_path_buf();
|
||||
|
||||
@@ -21,7 +21,7 @@ fn monero_internal(
|
||||
};
|
||||
|
||||
#[rustfmt::skip]
|
||||
let download_monero = format!(r#"
|
||||
let mut download_monero = format!(r#"
|
||||
FROM alpine:latest AS monero
|
||||
|
||||
RUN apk --no-cache add wget gnupg
|
||||
@@ -41,6 +41,16 @@ RUN tar -xvjf monero-linux-{arch}-v{MONERO_VERSION}.tar.bz2 --strip-components=1
|
||||
network.label(),
|
||||
);
|
||||
|
||||
if os == Os::Alpine {
|
||||
// Increase the default stack size, as Monero does heavily use its stack
|
||||
download_monero += &format!(
|
||||
r#"
|
||||
ADD orchestration/increase_default_stack_size.sh .
|
||||
RUN ./increase_default_stack_size.sh {monero_binary}
|
||||
"#
|
||||
);
|
||||
}
|
||||
|
||||
let setup = mimalloc(os) + &download_monero;
|
||||
|
||||
let run_monero = format!(
|
||||
@@ -69,13 +79,13 @@ CMD ["/run.sh"]
|
||||
}
|
||||
|
||||
pub fn monero(orchestration_path: &Path, network: Network) {
|
||||
monero_internal(network, Os::Debian, orchestration_path, "monero", "monerod", "18080 18081")
|
||||
monero_internal(network, Os::Alpine, orchestration_path, "monero", "monerod", "18080 18081")
|
||||
}
|
||||
|
||||
pub fn monero_wallet_rpc(orchestration_path: &Path) {
|
||||
monero_internal(
|
||||
Network::Dev,
|
||||
Os::Debian,
|
||||
Os::Alpine,
|
||||
orchestration_path,
|
||||
"monero-wallet-rpc",
|
||||
"monero-wallet-rpc",
|
||||
|
||||
Reference in New Issue
Block a user