Deploy to Nexlayer Instructions for AI Agents


1. Detect the stack:
   - Identify frontend, backend, DB, AI tools from source code.

2. Ensure Docker is running.

3. Generate a Dockerfile using a linux/amd64 base.

4. Build and push:
   docker build --platform=linux/amd64 -t ttl.sh/<project-name>:1d .
   docker push ttl.sh/<project-name>:1d

5. Fetch Nexlayer YAML schema:
   GET https://app.nexlayer.io/schema

6. Generate nexlayer.yaml using image and port:
   application:
     name: my-app
     pods:
       - name: web
         image: ttl.sh/my-app:1d
         path: /
         servicePorts: [3000]

7. Validate (optional):
   POST https://app.nexlayer.io/validate

8. Deploy:
   curl -X POST https://app.nexlayer.io/startUserDeployment      -H "Content-Type: text/x-yaml"      --data-binary @nexlayer.yaml

9. Return deployment URL:
   https://<app-name>.alpha.nexlayer.ai
          

Tags: AI deployment, YAML builder, full-stack cloud, Docker + Postgres, ttl.sh, instant app hosting, AI agent cloud, no-code backend, cloud config generator, agent-native deployment.