Monorepo for Aesthetic.Computer aesthetic.computer
at main 52 lines 2.4 kB view raw
1# Install mkcert CA root certificate from Docker container 2# Run this in PowerShell as Administrator 3 4Write-Host "🔍 Finding Docker container..." -ForegroundColor Cyan 5 6# Get the container ID/name for the aesthetic-computer workspace 7$container = docker ps --filter "label=devcontainer.local_folder" --format "{{.Names}}" | Select-Object -First 1 8 9if (-not $container) { 10 # Try finding by image or volume 11 $container = docker ps --format "{{.Names}}" | Where-Object { $_ -match "aesthetic" } | Select-Object -First 1 12} 13 14if (-not $container) { 15 Write-Host "❌ Could not find Docker container." -ForegroundColor Red 16 Write-Host "" 17 Write-Host "📋 Manual steps:" -ForegroundColor Yellow 18 Write-Host "1. Find your container name: docker ps" 19 Write-Host "2. Copy the certificate:" 20 Write-Host ' docker cp <container-name>:/workspaces/aesthetic-computer/ssl-dev/rootCA.pem $env:TEMP\rootCA.pem' 21 Write-Host "3. Import it:" 22 Write-Host ' Import-Certificate -FilePath $env:TEMP\rootCA.pem -CertStoreLocation Cert:\LocalMachine\Root' 23 Write-Host "4. Restart your browser" 24 exit 1 25} 26 27Write-Host "✅ Found container: $container" -ForegroundColor Green 28 29# Copy the certificate from the container 30$tempCert = "$env:TEMP\mkcert-rootCA.pem" 31Write-Host "📋 Copying certificate from container..." -ForegroundColor Cyan 32 33docker cp "${container}:/workspaces/aesthetic-computer/ssl-dev/rootCA.pem" $tempCert 34 35if (Test-Path $tempCert) { 36 Write-Host "📜 Installing mkcert CA root certificate into Windows Trust Store..." -ForegroundColor Cyan 37 Import-Certificate -FilePath $tempCert -CertStoreLocation Cert:\LocalMachine\Root 38 Remove-Item $tempCert 39 Write-Host "" 40 Write-Host "✅ CA root certificate installed successfully!" -ForegroundColor Green 41 Write-Host "" 42 Write-Host "⚠️ IMPORTANT: Fully close and restart Chrome for changes to take effect." -ForegroundColor Yellow 43 Write-Host " (Don't just refresh - close ALL Chrome windows and reopen)" -ForegroundColor Yellow 44 Write-Host "" 45 Write-Host "Your HTTPS URLs should now work:" -ForegroundColor Cyan 46 Write-Host " • https://localhost:8888" 47 Write-Host " • https://localhost:3002" 48 Write-Host " • https://localhost:8889" 49} else { 50 Write-Host "❌ Failed to copy certificate from container." -ForegroundColor Red 51 Write-Host "Container path: /workspaces/aesthetic-computer/ssl-dev/rootCA.pem" 52}