Fixes for prior commit

This commit is contained in:
Luke Parker 2024-03-23 22:22:24 -04:00
parent 333a9571b8
commit 1f92e1cbda
No known key found for this signature in database
3 changed files with 20 additions and 12 deletions

View file

@ -43,8 +43,7 @@ CMD ["/run.sh"]
network.label()
);
let run =
os(Os::Debian, "", "bitcoin") + &run_bitcoin;
let run = os(Os::Debian, "", "bitcoin") + &run_bitcoin;
let res = setup + &run;
let mut bitcoin_path = orchestration_path.to_path_buf();

View file

@ -55,11 +55,9 @@ CMD ["/run.sh"]
network.label(),
);
let run = crate::os(
os,
if os == Os::Alpine { "RUN apk --no-cache add gcompat" } else { "" },
"monero",
) + &run_monero;
let run =
crate::os(os, if os == Os::Alpine { "RUN apk --no-cache add gcompat" } else { "" }, "monero") +
&run_monero;
let res = setup + &run;
let mut monero_path = orchestration_path.to_path_buf();

View file

@ -2,7 +2,14 @@
// TODO: Generate keys for a validator and the infra
use core::ops::Deref;
use std::{collections::HashSet, env, path::PathBuf, io::Write, fs, process::Command};
use std::{
collections::HashSet,
env,
path::PathBuf,
io::Write,
fs,
process::{Stdio, Command},
};
use zeroize::Zeroizing;
@ -443,19 +450,23 @@ fn start(network: Network, services: HashSet<String>) {
command
} else {
// Assign a persistent volume if this isn't for Dev
command.arg("--volume").arg(volume);
}
command.arg("--volume").arg(volume)
};
let command = match name {
"bitcoin" => {
// Expose the RPC for tests
if network == Network::Dev {
command.arg("-p").arg("8332:8332")
} else {
command
}
}
"monero" => {
// Expose the RPC for tests
if network == Network::Dev {
command.arg("-p").arg("18081:18081")
} else {
command
}
}
"monero-wallet-rpc" => {
@ -466,13 +477,13 @@ fn start(network: Network, services: HashSet<String>) {
"coordinator" => {
if network == Network::Dev {
command
else {
} else {
// Publish the port
command.arg("-p").arg("30563:30563")
}
}
"serai" => {
let mut command = command.arg("--volume").arg(format!("{serai_runtime_volume}:/runtime");
let command = command.arg("--volume").arg(format!("{serai_runtime_volume}:/runtime"));
if network == Network::Dev {
command
} else {