Skip to content

🔐 Production Deployment (Enabling HTTPS) & Documentation #127

@maryamv

Description

@maryamv

@s1monj @ryanlovett and Eric (don't know his GitHub handle)

As we continue refining our deployment setup for JupyterHealth Exchange (JHE), we should also tighten our production deployment documentation to reflect real-world production needs. To ensure proper security and compatibility — especially for OAuth2 + PKCE — we need to document how to serve Django securely behind HTTPS.

In our documentation site, we should provide examples in both Kubernetes-based and non-Kubernetes environments.

⚠️ Context

Modern browsers restrict use of sensitive cryptographic APIs (like Crypto.subtle) to secure contexts (HTTPS), with the one exception being development over localhost. Since Django does not support HTTPS directly, we’ll need to use a reverse proxy like nginx in front of Django to terminate HTTPS. This is a standard production deployment pattern, and it ensures that browser-based workflows (like OAuth2 + PKCE) function correctly and securely.

Recommended Non-Kubernetes Production Setup

  1. Provision a Linux Server
  2. Install and Configure PostgreSQL
  3. Install the Application (JHE)
  4. Run Database Migrations
  5. Run Gunicorn Application Server
  6. Configure systemd Service
  7. Set Up Nginx as Reverse Proxy
  8. Configure HTTPS with certbot
  9. Set Up DNS
  10. Test Deployment

Post-Deployment: Administering JHE

  • Run Database Migrations
  • Seed Initial Data
  • Create a Django Admin User
  • Configure OAuth Application
  • Integrate JupyterHub Authentication
  • Enable Group-Based Access

Recommended Kubernetes-Based Production Setup

(via AWS EKS, ingress-nginx, and cert-manager)

  1. Create the Kubernetes Cluster
  2. Install ingress-nginx with AWS NLB support
  3. Install cert-manager for HTTPS
  4. Deploy JupyterHealth Exchange
  5. Set up DNS and expose JHE endpoint
  6. Connect a PostgreSQL database

Post-Deployment: Administering JHE

  • Migrate the database
  • Seed initial data
  • Configure OAuth client in Django Admin
  • Integrate JupyterHub authentication
  • Group-based access control

For Local Development

HTTPS is not required if you’re running on localhost. Modern browsers allow insecure HTTP access on localhost for development purposes.

If you're seeing Crypto.subtle errors on localhost, verify:

  • You're using localhost, not a LAN IP or hostname
  • You're not forcing HTTPS-only mode in the browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationtroubleshootingIssues getting started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions