@ -0,0 +1,22 @@ | |||||
echo "creating base certificate (.pem) and private key (.key) files..." | |||||
openssl req \ | |||||
-x509 \ | |||||
-days 365 \ | |||||
-out docker-self-signed.pem \ | |||||
-keyout docker-self-signed.key \ | |||||
-newkey rsa:2048 -nodes -sha256 \ | |||||
-subj '/CN=localhost' \ | |||||
-extensions EXT \ | |||||
-config <( \ | |||||
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName='DNS.1:localhost,DNS.2:host.docker.internal'\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth") | |||||
echo "printing text version..." | |||||
openssl x509 -in docker-self-signed.pem -text -noout > docker-self-signed.txt | |||||
echo "generating certificate container file (.pfx)..." | |||||
openssl pkcs12 -export \ | |||||
-inkey docker-self-signed.key \ | |||||
-in docker-self-signed.pem \ | |||||
-out docker-self-signed.pfx \ | |||||
-name "Docker development certificate" \ | |||||
-password pass:$1 |
@ -0,0 +1,8 @@ | |||||
param ( | |||||
[Parameter(Mandatory = $true)] | |||||
[string]$Password | |||||
) | |||||
$CertPassword = ConvertTo-SecureString -String "$Password" -Force -AsPlainText | |||||
Import-PfxCertificate -Exportable -FilePath .\docker-self-signed.pfx -CertStoreLocation Cert:\CurrentUser\Root\ -Password $CertPassword |
@ -0,0 +1,31 @@ | |||||
version: '3.4' | |||||
services: | |||||
identity-api: | |||||
environment: | |||||
- ASPNETCORE_URLS=https://+:443;http://+:80 | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Password=<secure-COMPLEX-and-SECRET-password> | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/docker-self-signed.pfx | |||||
volumes: | |||||
- ~/.aspnet/https:/https:ro | |||||
webstatus: | |||||
environment: | |||||
- ASPNETCORE_URLS=https://+:443 | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Password=<secure-COMPLEX-and-SECRET-password> | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/docker-self-signed.pfx | |||||
volumes: | |||||
- ~/.aspnet/https:/https:ro | |||||
webmvc: | |||||
environment: | |||||
- ASPNETCORE_URLS=https://+:443 | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Password=<secure-COMPLEX-and-SECRET-password> | |||||
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/docker-self-signed.pfx | |||||
volumes: | |||||
- ~/.aspnet/https:/https:ro | |||||
webshoppingapigw: | |||||
volumes: | |||||
- ~/.aspnet/https:/https:ro |
@ -0,0 +1,8 @@ | |||||
if ($args.Count -eq 0) { | |||||
docker-compose.exe -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.certificates.yml up -d | |||||
} elseif ($args.Count -eq 1 -and $args[0] -eq "infra") { | |||||
docker-compose.exe -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.certificates.yml up -d seq sqldata nosqldata basketdata rabbitmq | |||||
} else { | |||||
docker-compose.exe -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.certificates.yml up -d $args | |||||
} |