Initialize Aster VM and deploy PostgreSQL host on ces-control
Verify databases and deploy Aster VM / verify-and-deploy (push) Waiting to run
Verify databases and deploy Aster VM / verify-and-deploy (push) Waiting to run
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
FROM rust:1.91.1-bookworm AS source
|
||||
WORKDIR /build
|
||||
ENV CARGO_BUILD_JOBS=1
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY crates ./crates
|
||||
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 aster-server -p aster-cli
|
||||
|
||||
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 && chown aster:aster /data
|
||||
COPY --from=build /build/target/release/aster-server /usr/local/bin/aster-server
|
||||
COPY --from=build /build/target/release/aster /usr/local/bin/aster
|
||||
USER 10001
|
||||
WORKDIR /data
|
||||
ENV ASTER_LISTEN=0.0.0.0:8080 SQLITE_PATH=/data/aster.db
|
||||
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 ["aster-server"]
|
||||
Reference in New Issue
Block a user