This commit is contained in:
+3
-5
@@ -56,11 +56,9 @@ RUN set -e && \
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
||||
|
||||
WORKDIR /certs
|
||||
RUN apt update && apt upgrade -y && \
|
||||
apt install -y openssl && \
|
||||
openssl genrsa -out private_key.pem 2048 && \
|
||||
openssl rsa -in private_key.pem -pubout -out public_key.pem
|
||||
WORKDIR /
|
||||
COPY cert-gen.sh /cert-gen.sh
|
||||
RUN chmod +x /cert-gen.sh
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
openssl genrsa -out private_key.pem 2048
|
||||
openssl rsa -in private_key.pem -pubout -out public_key.pem
|
||||
@@ -15,6 +15,8 @@ services:
|
||||
- EmailPassword=${Email_Password}
|
||||
ports:
|
||||
- 5000:5000
|
||||
volumes:
|
||||
- ./certs:/certs
|
||||
depends_on:
|
||||
- auth-database
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copy certs-gen.sh into the mounted /certs volume if it doesn't exist
|
||||
if [ ! -f /certs/cert-gen.sh ]; then
|
||||
cp /cert-gen.sh /certs/cert-gen.sh
|
||||
chmod +x /certs/cert-gen.sh
|
||||
fi
|
||||
|
||||
# Launch the application
|
||||
exec dotnet Server.dll --urls http://+:5000
|
||||
Reference in New Issue
Block a user