diff --git a/backend/users/Dockerfile b/backend/users/Dockerfile index d7f7f99..a5e10c4 100644 --- a/backend/users/Dockerfile +++ b/backend/users/Dockerfile @@ -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