Updated auth to use generated keys

This commit is contained in:
Benjamin Sherriff
2024-01-29 21:24:10 -05:00
parent f2acb585c0
commit 4609be84a8
19 changed files with 213 additions and 87 deletions

View File

@@ -11,6 +11,18 @@ COPY Cargo.toml ./
RUN apt-get update && apt-get install -y cmake
RUN cargo build --release
# ======
# Keys
# ======
FROM debian:bookworm-slim as keys
WORKDIR /keys
RUN apt-get update && apt-get install -y openssl libpq-dev
RUN openssl genrsa -out access.pem 4096
RUN openssl rsa -in access.pem -pubout -outform PEM -out access.pem.pub
RUN openssl genrsa -out refresh.pem 4096
RUN openssl rsa -in refresh.pem -pubout -outform PEM -out refresh.pem.pub
# ==========
# Packages
# ==========
@@ -51,6 +63,7 @@ USER root
COPY --from=builder /builder/target/release/service /usr/local/bin/service
COPY --from=packages /packages /usr/bin
COPY --from=keys /keys /keys
RUN apt-get update && apt-get install -y libc6 libc6-dev libopus-dev libpq5 libpq-dev python3-pip ffmpeg