Azure Container Apps
Deploy CodeNull AI Backend to Azure Container Apps
Deploying to Azure Container Apps
Azure Container Apps is a serverless container service that enables you to run microservices and containerized applications on a serverless platform. This guide covers the process of deploying the CodeNull AI Backend to Azure Container Apps.
Testing Locally with Docker
Before deploying to Azure, it’s recommended to test your application locally:
Build the Docker image
This compiles your application into a Docker image.
Run the container locally
This starts a container with your application accessible at http://localhost:8000.
Login to Azure
Before deploying to Azure, you need to authenticate:
Creating Azure Resources
If you haven’t already created a resource group, create one with:
Deploying to Azure Container Apps
Azure Container Apps allows you to deploy directly from your local source code:
This command:
- Creates a new container app called
web-codenull-app
- Configures it with external ingress to allow public access
- Maps it to port 8000 (the port your application listens on)
- Builds and deploys the application from the current directory
Viewing Your Deployment
To view details about your deployed container app:
Your application should now be accessible at the URL provided in the output (e.g., https://<your-app-name>.<region>.azurecontainerapps.io/
).
API Endpoints
All endpoints (except health check) use the base path /codenull/ai/api/v1/
. Here are some of the available endpoints:
- Health Check:
GET /health
- Chat Completion:
POST /codenull/ai/api/v1/chat-completion
- Generate Website:
POST /codenull/ai/api/v1/generate-website
- Optimize SEO:
POST /codenull/ai/api/v1/optimize-seo
- Evaluate Website:
POST /codenull/ai/api/v1/evaluate-website
For comprehensive documentation, visit the API Reference.
Next Steps
For production deployments, we recommend: