- add: session-service

- move: redis_cache from database service to utils so it can be reused
- update: redis_cache set function to allow creating a key without a lifetime
- update: services to use the new get_or_generate_service_id function
This commit is contained in:
2024-12-20 14:43:25 -05:00
parent 07e991fbdc
commit 3c1f8c40d6
16 changed files with 291 additions and 10 deletions

View File

@@ -0,0 +1,33 @@
FROM rust:1.83 AS builder
LABEL authors="raven"
WORKDIR /usr/src/proto
COPY ./proto .
WORKDIR /usr/src/utils
COPY ./utils .
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --assume-yes \
protobuf-compiler
WORKDIR /usr/src/session-service
COPY ./session-service .
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends --assume-yes \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/session-service/target/release/session-service /usr/local/bin/session-service
EXPOSE 50055
CMD ["session-service"]