Deploying Django Rest Framework with Postgres on fly.io

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ss-api

  • then clone from the repo here:

  • django-rest-framework

    Web APIs for Django. 🎸

  • In this post, I will be demonstrating how to deploy a Django Rest Framework (DRF) application on fly.io. DRF is built on top of Django and is my choice when it comes to building small to massive APIs. I have used it extensively professionally and personally, and as a cybersecurity researcher, it's been my favorite to build as a backend for some complex applications that track malicious actors and their infrastructure. I noticed the fly website did not have a Django example, so I wanted to provide the community with a template to get started to avoid the headaches that I endured building this :)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • flyctl

    Command line tools for fly.io services

  • â””> fly postgres create ? App Name: ssapidb Automatically selected personal organization: Zack Allen ? Select region: iad (Ashburn, Virginia (US)) ? Select VM size: shared-cpu-1x - 256 ? Volume size (GB): 10 Creating postgres cluster ssapidb in organization personal Postgres cluster ssapidb created Username: postgres Password: SECRETPASSWORD Hostname: ssapidb.internal Proxy Port: 5432 PG Port: 5433 Save your credentials in a secure place, you won't be able to see them again! Monitoring Deployment ... ... 2 desired, 2 placed, 2 healthy, 0 unhealthy [health checks: 6 total, 6 passing] --> v0 deployed successfully Connect to postgres Any app within the personal organization can connect to postgres using the above credentials and the hostname "ssapidb.internal." For example: postgres://postgres:[email protected]:5432 See the postgres docs for more information on next steps, managing postgres, connecting from outside fly: https://fly.io/docs/reference/postgres/

  • drf-yasg

    Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

  • Swagger and OpenAPI capabilities using drf-yasg, where you can only see endpoints and Swagger docs if you have a valid Token

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts