Skip to content

Commit

Permalink
autogenerate pem files for users
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardem committed Sep 24, 2024
1 parent b4249f3 commit 35049d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/users/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ COPY . .

RUN go build .

VOLUME /opt/ylem_users/config/jwt

# Generate SSH keys for JWT if don't exist
RUN printf "n" | ssh-keygen -t rsa -b 4096 -m PEM -f ./config/jwt/private.pem -q -N ""
RUN printf "" | openssl rsa -in ./config/jwt/private.pem -pubout -passin 'pass:' -outform PEM -out ./config/jwt/public.pem
RUN printf "n" | ssh-keygen -t rsa -b 4096 -m PEM -f ./config/jwt/private.pem -q -N ""; exit 0
RUN printf "" | openssl rsa -in ./config/jwt/private.pem -pubout -passin 'pass:' -outform PEM -out ./config/jwt/public.pem; exit 0

FROM golang:1.21-alpine AS final

Expand Down

0 comments on commit 35049d1

Please sign in to comment.