Using Vite Production Build Locally - TACC/Core-Portal GitHub Wiki

Testing Steps

  1. Stop all running containers.

  2. Build assets: npm ci && npm run build

  3. Set _DEBUG = False in server/portal/settings/settings_custom.py

  4. Tweak Nginx conf to prevent Django from trying to serve static files.

    1. Edit server/conf/nginx/nginx.conf.
    2. Change line 83 to:
    location ~ ^/(auth|workbench|tickets|googledrive-privacy-policy|public-data|accounts|api|login|webhooks|search) {
    
  5. Restart all containers.

  6. Tell Django to use the assets you just built.

    1. Shell into the Django container: docker exec -it core_portal_django /bin/bash
    2. Collect static files: python manage.py collectstatic
  7. Navigate to your local portal instance and check that the UI renders correctly.

    • In your Network tab, the index and vendor bundle hashes should match the ones in client/dist/: image