initialize
This commit is contained in:
commit
f6e3fdd3c2
22 changed files with 7447 additions and 0 deletions
40
Dockerfile
Normal file
40
Dockerfile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
FROM rustlang/rust:nightly-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt update && apt install -y \
|
||||
musl-tools \
|
||||
musl-dev \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
curl \
|
||||
pkg-config \
|
||||
ca-certificates
|
||||
|
||||
# Copy dependency files first for better caching
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY ./src ./src
|
||||
COPY config.toml .
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release
|
||||
|
||||
|
||||
# Builder
|
||||
FROM gcr.io/distroless/cc
|
||||
|
||||
# Copy the binary
|
||||
COPY --from=builder /app/target/release/silserv /
|
||||
COPY --from=builder /app/config.toml /
|
||||
|
||||
# Create data directory
|
||||
|
||||
EXPOSE 36530
|
||||
|
||||
# Environment defaults
|
||||
ENV SILSERV_LOG_LEVEL=debug
|
||||
ENV SILSERV_STORAGE__PATH=/app/data/silserv.db
|
||||
|
||||
|
||||
CMD ["./silserv"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue