Deployments

Replit

This guide shows you how to deploy the Superagent API to Replit

Step-by-step guide

  1. Create a Replit REPL by importing the Superagent Github Repository. Link

  2. Set the REPL language to Python

  3. Replace the contents of the .replit file in your REPL with the following

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    run = "chmod 777 ./libs/superagent/replit.sh && cd ./libs/superagent && ./replit.sh"
    modules = ["python-3.10:v18-20230807-322e88b", "nodejs-18:v3-20230608-f4cd419"]
    
    hidden = [".pythonlibs"]
    
    [nix]
    channel = "stable-23_05"
    
    [deployment]
    run = ["sh", "-c", "chmod 777 ./libs/superagent/replit.sh && cd ./libs/superagent && ./replit.sh"]
    deploymentTarget = "cloudrun"
    
  4. Add all necessary .env variables as Replit Secrets. Also, add the following additional secret:

    1
    TZ = Etc/UTC
    
  5. Deploy the REPL using Replit Autoscale.

Video tutorial