Files
SkyArtShop/Sky_Art_shop/QUICK_DEPLOY.md
Local Server 703ab57984 Fix admin route access and backend configuration
- Added /admin redirect to login page in nginx config
- Fixed backend server.js route ordering for proper admin handling
- Updated authentication middleware and routes
- Added user management routes
- Configured PostgreSQL integration
- Updated environment configuration
2025-12-13 22:34:11 -06:00

4.4 KiB

Quick IIS Deployment Guide - Sky Art Shop

Simplified Deployment (5 Steps)

Step 1: Install Prerequisites (One-Time)

A. Enable IIS

  • Run PowerShell as Administrator
  • Execute:
cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -InstallIIS
  • Restart your computer

B. Install .NET 8.0 Hosting Bundle

Step 2: Deploy Your Site

Run PowerShell as Administrator:

cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -CreateSite

That's it! The script handles everything:

  • Publishing the application
  • Creating IIS site
  • Setting permissions
  • Configuring firewall

Step 3: Verify MongoDB is Running

# Check if MongoDB is running
Get-Service -Name MongoDB* -ErrorAction SilentlyContinue

# If not running, start it
net start MongoDB

Step 4: Test Locally

  1. Open browser
  2. Go to: http://localhost
  3. You should see your site!

If you get errors:

# Check IIS status
Get-WebSite -Name "SkyArtShop"

# Restart IIS
iisreset /restart

# Check what's using port 80
netstat -ano | findstr :80

Step 5: Configure Network (For Internet Access)

A. Set Static IP

  1. Control Panel → Network → Properties
  2. Set static IP (e.g., 192.168.1.100)

B. Router Port Forwarding

  1. Login to your router (usually 192.168.1.1)
  2. Forward port 80 → your PC's IP (192.168.1.100)

C. No-IP Client

  1. Download: https://www.noip.com/download
  2. Install and login
  3. Your site will be at: http://your-hostname.ddns.net

🔄 Updating Your Site

When you make changes:

cd "E:\Documents\Website Projects\Sky_Art_Shop"
.\deploy.ps1 -UpdateOnly

🆘 Quick Troubleshooting

Site won't load locally:

# Restart IIS
iisreset /restart

# Check site status
Get-WebSite -Name "SkyArtShop"

# If stopped, start it
Start-WebSite -Name "SkyArtShop"

502.5 Error:

  • You need to install .NET 8.0 Hosting Bundle
  • Restart computer after installing

403 Forbidden:

# Fix permissions
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
iisreset /restart

Can't access from internet:

  • Check port forwarding on router
  • Make sure No-IP DUC is running
  • Test your public IP directly first

📝 Your URLs After Deployment


⚙️ Manual Deployment (If Script Fails)

If the automated script doesn't work, follow these steps:

1. Publish Application

cd "E:\Documents\Website Projects\Sky_Art_Shop"
dotnet publish SkyArtShop.csproj -c Release -o "C:\inetpub\wwwroot\skyartshop"

2. Create IIS Site Manually

  1. Open IIS Manager (search in Windows Start)
  2. Right-click Sites → Add Website
  3. Site name: SkyArtShop
  4. Physical path: C:\inetpub\wwwroot\skyartshop
  5. Port: 80
  6. Click OK

3. Configure Application Pool

  1. Click Application Pools
  2. Right-click SkyArtShop → Basic Settings
  3. .NET CLR version: No Managed Code
  4. OK

4. Set Permissions

icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IUSR:(OI)(CI)F" /T

5. Configure Firewall

New-NetFirewallRule -DisplayName "SkyArtShop-HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow

6. Start Site

Start-WebSite -Name "SkyArtShop"

🎯 Deployment Checklist

  • IIS installed
  • .NET 8.0 Hosting Bundle installed
  • Computer restarted after installations
  • MongoDB running
  • Application published to C:\inetpub\wwwroot\skyartshop
  • IIS site created
  • Application pool set to "No Managed Code"
  • Permissions granted
  • Firewall rule added
  • Site accessible at http://localhost
  • (Optional) Static IP configured
  • (Optional) Router port forwarding
  • (Optional) No-IP client installed

For the full detailed guide, see DEPLOYMENT_GUIDE.md