mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-10 12:54:35 +00:00
parent
42a711ee51
commit
ccdb834e6e
2 changed files with 13 additions and 7 deletions
|
@ -38,6 +38,8 @@ services:
|
||||||
args:
|
args:
|
||||||
TAG: serai
|
TAG: serai
|
||||||
entrypoint: /scripts/entry-dev.sh
|
entrypoint: /scripts/entry-dev.sh
|
||||||
|
volumes:
|
||||||
|
- "./serai/scripts:/scripts"
|
||||||
|
|
||||||
serai-base:
|
serai-base:
|
||||||
<<: *serai_defaults
|
<<: *serai_defaults
|
||||||
|
|
|
@ -20,12 +20,17 @@ RUN pip3 install solc-select==0.2.1
|
||||||
RUN solc-select install 0.8.16
|
RUN solc-select install 0.8.16
|
||||||
RUN solc-select use 0.8.16
|
RUN solc-select use 0.8.16
|
||||||
|
|
||||||
# Build it
|
# Mount cargo and serai cache for Cache & Build
|
||||||
RUN cargo build --release
|
RUN --mount=type=cache,target=/usr/local/cargo/git \
|
||||||
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
||||||
|
--mount=type=cache,target=/serai/target/release/build \
|
||||||
|
--mount=type=cache,target=/serai/target/release/deps \
|
||||||
|
--mount=type=cache,target=/serai/target/release/.fingerprint \
|
||||||
|
--mount=type=cache,target=/serai/target/release/incremental \
|
||||||
|
--mount=type=cache,target=/serai/target/release/wbuild \
|
||||||
|
--mount=type=cache,target=/serai/target/release/lib* \
|
||||||
|
cargo build --release
|
||||||
|
|
||||||
# Mount for Cache
|
|
||||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
||||||
--mount=type=cache,target=/serai/target
|
|
||||||
|
|
||||||
# Prepare Image
|
# Prepare Image
|
||||||
FROM ubuntu:latest as image
|
FROM ubuntu:latest as image
|
||||||
|
@ -34,9 +39,8 @@ LABEL description="STAGE 2: Copy and Run"
|
||||||
WORKDIR /home/serai
|
WORKDIR /home/serai
|
||||||
|
|
||||||
# Copy necessary files to run node
|
# Copy necessary files to run node
|
||||||
COPY --from=builder /serai/target/release/* /bin/
|
COPY --from=builder /serai/target/release/ /bin/
|
||||||
COPY --from=builder /serai/AGPL-3.0 .
|
COPY --from=builder /serai/AGPL-3.0 .
|
||||||
COPY deploy/serai/scripts /scripts
|
|
||||||
|
|
||||||
# Run node
|
# Run node
|
||||||
EXPOSE 30333 9615 9933 9944
|
EXPOSE 30333 9615 9933 9944
|
||||||
|
|
Loading…
Reference in a new issue