mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Cluster Orchestration with Docker Compose (#114)
* add file * builds + caching fixed * bitcoin orchestration * remove default entrypoint * eth image and cleanup * working monero * remove signature file * cleanup on aisle eth * cleanup on aisle btc * eth working * remove docker ignore * remove bitcoin image readme * fix serai builds * serai clusters * added readme for docker * formatting * share the image * newlines at EOF * add multi profile example * coin order * coin order * profile order * fix grammar * fix whitespace * reduce trusted signature set, require at least 3 signatures. * remove echo * update comment to ref trusted keys * comment fix * use 16 keys, check for laanwj, name compose * don't use bash * monero fingerprints & eth fixes * eth fixes * remove extra eth keys
This commit is contained in:
42
deploy/serai/Dockerfile
Normal file
42
deploy/serai/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
LABEL description="STAGE 1: Build"
|
||||
|
||||
# Add files for build
|
||||
ADD substrate /serai/substrate
|
||||
ADD processor /serai/processor
|
||||
ADD coins /serai/coins
|
||||
ADD crypto /serai/crypto
|
||||
ADD contracts /serai/contracts
|
||||
ADD Cargo.toml /serai
|
||||
ADD AGPL-3.0 /serai
|
||||
|
||||
WORKDIR /serai
|
||||
|
||||
# Update Rust
|
||||
RUN rustup update
|
||||
|
||||
# Install Solc @ 0.8.16
|
||||
RUN pip3 install solc-select
|
||||
RUN solc-select install 0.8.16
|
||||
RUN solc-select use 0.8.16
|
||||
|
||||
# Build it
|
||||
RUN cargo build --release
|
||||
|
||||
# Mount for Cache
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/serai/target
|
||||
|
||||
# Prepare Image
|
||||
FROM ubuntu:latest as image
|
||||
LABEL description="STAGE 2: Copy and Run"
|
||||
|
||||
WORKDIR /home/serai
|
||||
|
||||
# Copy necessary files to run node
|
||||
COPY --from=builder /serai/target/release/* /bin/
|
||||
COPY --from=builder /serai/AGPL-3.0 .
|
||||
|
||||
# Run node
|
||||
EXPOSE 30333 9615 9933 9944
|
||||
CMD ["serai-node"]
|
||||
6
deploy/serai/scripts/entry-dev.sh
Normal file
6
deploy/serai/scripts/entry-dev.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
if [[ -z $VALIDATOR ]]; then
|
||||
serai-node --chain $CHAIN --name $NAME
|
||||
else
|
||||
serai-node --chain $CHAIN --name $NAME --validator
|
||||
fi
|
||||
Reference in New Issue
Block a user