CI refactor
Some checks failed
Build and Test / build-editions (terraria) (push) Failing after 1m12s
Build and Test / build-editions (DATABASE_SMM, puyopuyo) (push) Failing after 1m15s
Build and Test / build-editions (wii-u-chat) (push) Failing after 1m16s
Build and Test / build-editions (splatoon) (push) Failing after 1m16s
Build and Test / build-editions (fast-racing-neo) (push) Failing after 1m16s
Build and Test / build-editions (DATABASE_FRIENDS, friends) (push) Failing after 1m16s
Build and Test / build-editions (mario-tennis) (push) Failing after 1m17s
Build and Test / build-editions (sonic-transformed) (push) Failing after 1m17s
Build and Test / build-editions (splatoon-testfire) (push) Failing after 1m18s
Build and Test / build-editions (minecraft-wiiu) (push) Failing after 1m18s
Build and Test / build-editions (DATABASE_SMM, wii-sports-club) (push) Failing after 1m18s
Build and Test / build-editions (DATABASE_SMM, super-mario-maker) (push) Failing after 1m18s
Some checks failed
Build and Test / build-editions (terraria) (push) Failing after 1m12s
Build and Test / build-editions (DATABASE_SMM, puyopuyo) (push) Failing after 1m15s
Build and Test / build-editions (wii-u-chat) (push) Failing after 1m16s
Build and Test / build-editions (splatoon) (push) Failing after 1m16s
Build and Test / build-editions (fast-racing-neo) (push) Failing after 1m16s
Build and Test / build-editions (DATABASE_FRIENDS, friends) (push) Failing after 1m16s
Build and Test / build-editions (mario-tennis) (push) Failing after 1m17s
Build and Test / build-editions (sonic-transformed) (push) Failing after 1m17s
Build and Test / build-editions (splatoon-testfire) (push) Failing after 1m18s
Build and Test / build-editions (minecraft-wiiu) (push) Failing after 1m18s
Build and Test / build-editions (DATABASE_SMM, wii-sports-club) (push) Failing after 1m18s
Build and Test / build-editions (DATABASE_SMM, super-mario-maker) (push) Failing after 1m18s
This commit is contained in:
parent
7c5ed826f4
commit
9a621ed6bd
3 changed files with 67 additions and 399 deletions
50
Dockerfile
50
Dockerfile
|
|
@ -1,58 +1,20 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM rust:alpine AS chef
|
||||
RUN apk add --no-cache musl-dev lld g++ make
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /app
|
||||
|
||||
FROM chef AS planner
|
||||
COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM chef AS builder
|
||||
RUN apk add --no-cache protobuf-dev git openssl-dev openssl-libs-static bash yq ca-certificates
|
||||
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
ARG EDITION
|
||||
ARG DATABASE_URL
|
||||
|
||||
RUN --mount=type=cache,id=${EDITION}-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=${EDITION}-target,target=/app/target \
|
||||
cargo chef cook --release --recipe-path recipe.json --target x86_64-unknown-linux-musl && \
|
||||
cargo chef cook --tests --target x86_64-unknown-linux-musl --recipe-path recipe.json
|
||||
|
||||
COPY . .
|
||||
RUN --mount=type=cache,id=${EDITION}-registry,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,id=${EDITION}-target,target=/app/target \
|
||||
RNEX_STATIC=1 ./test-edition.sh && RNEX_STATIC=1 ./build-edition.sh && \
|
||||
mkdir -p /app/dist && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-node-holder /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/proxy_insecure /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/proxy_secure /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-auth /app/dist/ && \
|
||||
cp /app/target/x86_64-unknown-linux-musl/release/rnex-server-backend-secure /app/dist/
|
||||
|
||||
|
||||
FROM scratch AS node-holder
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-node-holder /rnex-server-backend-node-holder
|
||||
COPY dist/rnex-server-backend-node-holder /rnex-server-backend-node-holder
|
||||
ENTRYPOINT ["/rnex-server-backend-node-holder"]
|
||||
|
||||
FROM scratch AS proxy-insecure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/proxy_insecure /proxy_insecure
|
||||
COPY dist/proxy_insecure /proxy_insecure
|
||||
ENTRYPOINT ["/proxy_insecure"]
|
||||
|
||||
FROM scratch AS proxy-secure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/proxy_secure /proxy_secure
|
||||
COPY dist/proxy_secure /proxy_secure
|
||||
ENTRYPOINT ["/proxy_secure"]
|
||||
|
||||
FROM scratch AS backend-auth
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-auth /rnex-server-backend-auth
|
||||
COPY dist/rnex-server-backend-auth /rnex-server-backend-auth
|
||||
ENTRYPOINT ["/rnex-server-backend-auth"]
|
||||
|
||||
FROM scratch AS backend-secure
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /app/dist/rnex-server-backend-secure /rnex-server-backend-secure
|
||||
ENTRYPOINT ["/rnex-server-backend-secure"]
|
||||
COPY dist/rnex-server-backend-secure /rnex-server-backend-secure
|
||||
ENTRYPOINT ["/rnex-server-backend-secure"]
|
||||
Loading…
Reference in a new issue