This guide here would show you how to deploy a Django app to Akash using the Akash CLI or Console, along with a sample SDL (deploy.yaml
) file. It assumes you already have a Django app, and are familiar with Docker.
Prerequisites
- Install Docker: Required to containerize the Django app.
- Install Akash CLI: For command-line deployment.
- Akash Account & Wallet: You’ll need AKT tokens to deploy on the network.
- Akash Keystore: Set up your Akash keystore using akash keys add
if you haven’t already. - Akash Console (Optional): For a GUI-based deployment option.
Create Your Docker Image
- Set up a Dockerfile to containerize the application:
replace my_django_app
with the name of your app.
- Build the Docker image:
Step 2: Push the Image to a Container Registry
You need to push the Docker image to a registry that Akash can access (Docker Hub, GitHub Packages, or any public registry).
Step 3: Create the SDL Deployment File (deploy.yaml
)
Here’s a sample SDL file for deploying on Akash, based on your SDL template:
Step 4: Deploy to Akash Using the CLI
- Initialize Deployment:
- Wait for the Deployment to Match with a Provider: Check for available providers using: