Files
SkyArtShop/Sky_Art_shop/DEPLOYMENT_CHECKLIST.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

5.0 KiB

Sky Art Shop - Quick Deployment Checklist

🎯 Pre-Deployment Setup (One-Time)

1. Install Prerequisites

2. Network Configuration

  • Set Static Local IP

    1. Control Panel → Network → Change adapter settings
    2. Right-click network → Properties → IPv4 → Properties
    3. Use static IP: e.g., 192.168.1.100
  • Configure Router Port Forwarding

    1. Access router (usually http://192.168.1.1)
    2. Find Port Forwarding section
    3. Forward: External Port 80 → Internal IP 192.168.1.100:80
  • Install No-IP DUC Client

    1. Download: https://www.noip.com/download
    2. Install and login with No-IP credentials
    3. Verify it's updating your hostname

3. Security Setup

  • Change Admin Password
    • Edit: appsettings.Production.json
    • Update the password field
    • Use a strong password!

🚀 Deployment Steps (Every Time You Update)

Run PowerShell as Administrator:

cd "E:\Documents\Website Projects\Sky_Art_Shop"

# First time deployment (creates IIS site)
.\deploy.ps1 -CreateSite

# Future updates (faster, just updates files)
.\deploy.ps1 -UpdateOnly

Option B: Manual Deployment

Run PowerShell as Administrator:

# 1. Stop IIS site (if updating)
Stop-WebSite -Name "SkyArtShop"

# 2. Publish application
cd "E:\Documents\Website Projects\Sky_Art_Shop"
dotnet publish -c Release -o "C:\inetpub\wwwroot\skyartshop"

# 3. Set permissions
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
icacls "C:\inetpub\wwwroot\skyartshop\wwwroot\uploads" /grant "IIS_IUSRS:(OI)(CI)F" /T

# 4. Start IIS site
Start-WebSite -Name "SkyArtShop"

Testing

Test 1: Local (on server)

  • Open browser on server machine
  • Visit: http://localhost
  • Site loads correctly

Test 2: Local Network

  • On another device (phone/laptop on same WiFi)
  • Visit: http://192.168.1.100 (your server's local IP)
  • Site loads correctly

Test 3: Internet

🔍 Troubleshooting

Site Not Loading Locally

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

# Check if port 80 is listening
netstat -ano | findstr :80

# Restart IIS
iisreset /restart

Site Not Loading from Internet

MongoDB Connection Error

# Check MongoDB status
net start MongoDB

# If not running, start it
net start MongoDB

Permission Errors (403/500)

# Re-apply permissions
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IIS_IUSRS:(OI)(CI)F" /T
icacls "C:\inetpub\wwwroot\skyartshop" /grant "IUSR:(OI)(CI)F" /T

# Restart IIS
iisreset /restart

📊 Quick Commands

# Check site status
Get-WebSite -Name "SkyArtShop" | Select Name, State

# Start site
Start-WebSite -Name "SkyArtShop"

# Stop site
Stop-WebSite -Name "SkyArtShop"

# Restart IIS
iisreset /restart

# Check MongoDB
net start MongoDB

# View firewall rules
Get-NetFirewallRule -DisplayName "*SkyArtShop*"

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

🎯 Your Site URLs

After deployment, your site will be accessible at:

📝 Notes

  • Development: Continue using dotnet run on port 5001 for local development
  • Production: Clients access via your No-IP hostname
  • Updates: Run .\deploy.ps1 -UpdateOnly to push changes
  • Backups: Consider backing up identity.db and MongoDB before major updates

🎉 Success Criteria

Site loads on localhost
Site loads on local network
Site loads from internet via No-IP hostname
Admin login works
Images upload correctly
MongoDB data persists
No error messages in browser console


Ready to deploy? Start with the Pre-Deployment Setup, then run the automated deployment script!