feat: 0.0.1-dev
- expose shared config get/update endpoint - interceptor for reporting changes from user - task[recipe]: optimize recipe send flow, add material action (create/update, modify[not test]) - add secured session, in addition to auth message, this is required to use for newer client (expect ^0.0.2 for client) - disable plugin mode - optimize ram/cpu usages (reduce from 300MB to ~80MB) Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
parent
aa008ccd53
commit
317fcd4203
22 changed files with 3443 additions and 423 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -17,6 +17,7 @@ FROM chef AS builder
|
|||
# Capture Docker's target platform variables
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
# Install host tools needed for compilation (including cmake and clang for aws-lc-sys)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
|
|
@ -43,6 +44,9 @@ RUN apt-get update && \
|
|||
echo "CXX=/usr/bin/x86_64-linux-gnu-g++" >> /env_config; \
|
||||
echo "CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/x86_64-linux-gnu-gcc" >> /env_config; \
|
||||
echo "OPENSSL_DIR=/usr" >> /env_config; \
|
||||
if [ "$TARGETVARIANT" = "v3" ]; then \
|
||||
echo "export RUSTFLAGS='-C target-cpu=x86-64-v3'" >> /env_config; \
|
||||
fi \
|
||||
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev; \
|
||||
echo "TARGET_TRIPLE=aarch64-unknown-linux-gnu" >> /env_config; \
|
||||
|
|
@ -87,7 +91,17 @@ RUN . /env_config && \
|
|||
# -----------------------------------------------------------------------
|
||||
# Stage 3: Minimal Runtime
|
||||
# -----------------------------------------------------------------------
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
# We dynamically anchor the platform to a base architecture to stop Docker
|
||||
# from panicking over micro-variants like v3 during runtime container setup.
|
||||
FROM --platform=$TARGETPLATFORM debian:bookworm-slim AS runtime-base
|
||||
|
||||
# Trick Buildx: force the runner to resolve back to basic broad platforms
|
||||
# so it can execute native container processes like apt-get without errors.
|
||||
FROM --platform=linux/amd64 debian:bookworm-slim AS runtime-amd64
|
||||
FROM --platform=linux/arm64 debian:bookworm-slim AS runtime-arm64
|
||||
|
||||
# Select the clean runtime environment matching your target layout
|
||||
FROM runtime-$TARGETARCH AS final-runtime
|
||||
WORKDIR /app
|
||||
|
||||
# Install runtime dependencies if needed (like ca-certificates or openssl)
|
||||
|
|
@ -98,6 +112,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
|
||||
COPY --from=builder /server-mark2-dev /usr/local/bin/server-mark2-dev
|
||||
COPY --from=builder /app/.env /usr/local/bin/.env
|
||||
COPY --from=builder /app/.env /app/.env
|
||||
COPY --from=builder /app/sheet-api.json /usr/local/bin/sheet-api.json
|
||||
COPY --from=builder /app/sheet-api.json /app/sheet-api.json
|
||||
COPY --from=builder /app/shared-configures.json /usr/local/bin/shared-configures.json
|
||||
COPY --from=builder /app/shared-configures.json /app/shared-configures.json
|
||||
COPY --from=builder /app/plugins /usr/local/bin/plugins
|
||||
CMD ["server-mark2-dev"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue