Anpassung Pipeline und Dockerfile
This commit is contained in:
1 parent
adac95129d
commit
67b0e4ebd7
7 files changed
+68
-69
No files matched your search
+7
-18
@@ -1,44 +1,33 @@
|
||||
|
||||
# Build Stage
|
||||
FROM rust:1.75 as builder
|
||||
FROM rust:1.81 as builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy manifest files
|
||||
COPY Cargo.toml ./
|
||||
|
||||
# Copy source code and templates
|
||||
COPY Cargo.lock ./
|
||||
COPY src ./src
|
||||
COPY templates ./templates
|
||||
COPY static ./static
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release
|
||||
|
||||
# Runtime Stage
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Install required dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the binary from builder
|
||||
COPY --from=builder /usr/src/app/target/release/table-server /app/table-server
|
||||
|
||||
# Copy templates and static files
|
||||
COPY --from=builder /usr/src/app/target/release/paramod /app/paramod
|
||||
COPY --from=builder /usr/src/app/templates /app/templates
|
||||
COPY --from=builder /usr/src/app/static /app/static
|
||||
COPY paramod.yaml /app/paramod.yaml
|
||||
|
||||
# Create directory for config file
|
||||
RUN mkdir -p /app/data
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Set environment to use the data directory
|
||||
ENV CONFIG_PATH=/app/data/table_config.json
|
||||
ENV CONFIG_PATH=/app/paramod.yaml
|
||||
|
||||
# Run the binary
|
||||
CMD ["/app/table-server"]
|
||||
CMD ["/app/paramod"]
|
||||
Reference in new issue
Block a user