feat: establish Hestia server with preserved deployment resources
Verify Hestia server / verify (push) Failing after 0s
Verify Hestia server / verify (push) Failing after 0s
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
FROM rust:1.91.1-bookworm AS source
|
||||
WORKDIR /build
|
||||
ENV CARGO_BUILD_JOBS=1
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY crates ./crates
|
||||
COPY vendor ./vendor
|
||||
COPY scripts ./scripts
|
||||
|
||||
FROM source AS ci
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3 \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rustup component add rustfmt clippy
|
||||
ENV CARGO_PROFILE_DEV_DEBUG=0 CARGO_PROFILE_TEST_DEBUG=0
|
||||
CMD ["sh", "scripts/check.sh"]
|
||||
|
||||
FROM source AS build
|
||||
RUN cargo build --locked --release -p server -p admin
|
||||
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& useradd --system --uid 10001 --create-home aster \
|
||||
&& mkdir -p /data/host && chown -R aster:aster /data
|
||||
COPY --from=build /build/target/release/server /usr/local/bin/server
|
||||
COPY --from=build /build/target/release/cli /usr/local/bin/cli
|
||||
USER 10001
|
||||
WORKDIR /data
|
||||
ENV ASTER_LISTEN=0.0.0.0:8080 ASTER_STATE_DIR=/data/host
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=10s --timeout=6s --start-period=10s --retries=3 \
|
||||
CMD curl --fail --silent http://127.0.0.1:8080/health || exit 1
|
||||
CMD ["server"]
|
||||
Reference in New Issue
Block a user