syros 1.0.1

Syros - Distributed Coordination Service
Documentation
FROM rust:slim as builder

WORKDIR /app

RUN apt-get update && apt-get install -y \
    pkg-config \
    libssl-dev \
    libpq-dev \
    protobuf-compiler \
    && rm -rf /var/lib/apt/lists/*

COPY Cargo.toml ./
COPY src ./src
COPY config ./config
COPY benches ./benches
COPY proto ./proto
COPY build.rs ./

RUN cargo build --release

FROM debian:bookworm-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    ca-certificates \
    libssl3 \
    libpq5 \
    && rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/target/release/syros /app/syros
COPY --from=builder /app/config /app/config

EXPOSE 8080 9090 8081

CMD ["./syros"]