FROM rust:1.88 AS build
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
RUN cargo build --release -p irc-now-net-landing

FROM registry.access.redhat.com/ubi9-minimal
COPY --from=build /src/target/release/irc-now-net-landing /usr/local/bin/
COPY crates/net-landing/static/ /app/static/
WORKDIR /app
EXPOSE 8080
CMD ["irc-now-net-landing"]
