mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 19:49:22 +00:00
Move the processor and coordinator to Alpine
This commit is contained in:
parent
17e86ff072
commit
e3a789fc9f
3 changed files with 15 additions and 9 deletions
|
@ -15,9 +15,9 @@ pub fn coordinator(
|
|||
) {
|
||||
let db = network.db();
|
||||
let longer_reattempts = if network == Network::Dev { "longer-reattempts" } else { "" };
|
||||
let setup = mimalloc(Os::Debian).to_string() +
|
||||
let setup = mimalloc(Os::Alpine).to_string() +
|
||||
&build_serai_service(
|
||||
Os::Debian,
|
||||
Os::Alpine,
|
||||
network.release(),
|
||||
&format!("{db} {longer_reattempts}"),
|
||||
"serai-coordinator",
|
||||
|
@ -25,7 +25,7 @@ pub fn coordinator(
|
|||
|
||||
const ADDITIONAL_ROOT: &str = r#"
|
||||
# Install ca-certificates
|
||||
RUN apt install -y ca-certificates
|
||||
RUN apk add ca-certificates
|
||||
"#;
|
||||
|
||||
let env_vars = [
|
||||
|
@ -52,7 +52,7 @@ CMD {env_vars_str} serai-coordinator
|
|||
"#
|
||||
);
|
||||
|
||||
let run = os(Os::Debian, ADDITIONAL_ROOT, "coordinator") + &run_coordinator;
|
||||
let run = os(Os::Alpine, ADDITIONAL_ROOT, "coordinator") + &run_coordinator;
|
||||
let res = setup + &run;
|
||||
|
||||
let mut coordinator_path = orchestration_path.to_path_buf();
|
||||
|
|
|
@ -151,7 +151,13 @@ FROM rust:1.76.0-alpine3.19 as builder
|
|||
COPY --from=mimalloc-alpine libmimalloc.so /usr/lib
|
||||
ENV LD_PRELOAD=libmimalloc.so
|
||||
|
||||
RUN apk update && apk upgrade && apk add musl-dev
|
||||
RUN apk update && apk upgrade
|
||||
|
||||
# Add dev dependencies
|
||||
RUN apk add musl-dev
|
||||
|
||||
# Dependencies for the Serai node
|
||||
RUN apk add make protoc
|
||||
"#
|
||||
}
|
||||
};
|
||||
|
|
|
@ -15,9 +15,9 @@ pub fn processor(
|
|||
coin_key: Zeroizing<<Ristretto as Ciphersuite>::F>,
|
||||
entropy: Zeroizing<[u8; 32]>,
|
||||
) {
|
||||
let setup = mimalloc(Os::Debian).to_string() +
|
||||
let setup = mimalloc(Os::Alpine).to_string() +
|
||||
&build_serai_service(
|
||||
Os::Debian,
|
||||
Os::Alpine,
|
||||
network.release(),
|
||||
&format!("binaries {} {coin}", network.db()),
|
||||
"serai-processor",
|
||||
|
@ -25,7 +25,7 @@ pub fn processor(
|
|||
|
||||
const ADDITIONAL_ROOT: &str = r#"
|
||||
# Install ca-certificates
|
||||
RUN apt install -y ca-certificates
|
||||
RUN apk add ca-certificates
|
||||
"#;
|
||||
|
||||
// TODO: Randomly generate these
|
||||
|
@ -67,7 +67,7 @@ CMD {env_vars_str} serai-processor
|
|||
"#
|
||||
);
|
||||
|
||||
let run = os(Os::Debian, ADDITIONAL_ROOT, "processor") + &run_processor;
|
||||
let run = os(Os::Alpine, ADDITIONAL_ROOT, "processor") + &run_processor;
|
||||
let res = setup + &run;
|
||||
|
||||
let mut processor_path = orchestration_path.to_path_buf();
|
||||
|
|
Loading…
Reference in a new issue