Create the certs if missing and run instead
Docker Build and Release Upload / build (push) Successful in 1m22s
Docker Build and Release Upload / build (push) Successful in 1m22s
This commit is contained in:
+1
-4
@@ -56,10 +56,6 @@ RUN set -e && \
|
|||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
COPY cert-gen.sh /cert-gen.sh
|
|
||||||
RUN chmod +x /cert-gen.sh
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV ASPNETCORE_HTTP_PORTS=5000
|
ENV ASPNETCORE_HTTP_PORTS=5000
|
||||||
@@ -77,6 +73,7 @@ COPY --from=build-backend /app/publish ./
|
|||||||
# Copy in the client
|
# Copy in the client
|
||||||
COPY --from=build-frontend /debug/wwwroot ./wwwroot/
|
COPY --from=build-frontend /debug/wwwroot ./wwwroot/
|
||||||
|
|
||||||
|
# Copy in the entryscript and run
|
||||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
RUN chmod +x /docker-entrypoint.sh
|
RUN chmod +x /docker-entrypoint.sh
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
openssl genrsa -out private_key.pem 2048
|
|
||||||
openssl rsa -in private_key.pem -pubout -out public_key.pem
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Copy certs-gen.sh into the mounted /certs volume if it doesn't exist
|
# Copy certs-gen.sh into the mounted /certs volume if it doesn't exist
|
||||||
if [ ! -f /certs/cert-gen.sh ]; then
|
if [ ! -f /certs/private_key.pem ]; then
|
||||||
cp /cert-gen.sh /certs/cert-gen.sh
|
echo "Generating RSA key pair..."
|
||||||
chmod +x /certs/cert-gen.sh
|
openssl genrsa -out /certs/private_key.pem 2048
|
||||||
|
openssl rsa -in /certs/private_key.pem -pubout -out public_key.pem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Launch the application
|
# Launch the application
|
||||||
|
|||||||
Reference in New Issue
Block a user