Publish an application

更新时间:
复制 MD 格式

Deploy your application from App Generation to a production environment for team collaboration or public use. With a single click, you can deploy to an ECS instance and synchronize the code to your Git repository, automating the workflow from idea to launch.

Prerequisites

  • Linggou application: An application created in Linggou.

  • Code hosting platform account: You have a GitHub or Gitee account.

How it works

To avoid code synchronization conflicts, make all code changes through Linggou. If you manually modify and commit code on the Git platform, the next commit from App Generation might fail due to merge conflicts.
  1. Initial binding: Authorize and connect your Git account to App Generation.

  2. Automated repository creation: App Generation automatically creates a Git repository under your account for each new application.

  3. Real-time synchronization: The system automatically commits code changes from each chat round to the repository and generates a Commit ID.

  4. Version tracking: Use the Commit ID to view the details of each change and roll back with a single click.

Configure a Git repository

Synchronize your application code to a Git repository for version control, persistent storage, and change tracking.

  1. Go to the CloudOps Orchestration Service console and click Start AI Coding. In the App Generation console, click Settings in the lower-left corner.

  2. In the panel that appears, select Git Configuration and then click Specifications.

  3. On the authorization page, sign in to your GitHub or Gitee account and grant authorization. After you grant access, the system automatically creates a Git repository under your account for each new application.

Publish an application to an ECS instance

Publish an application for the first time

  1. In the application editor, click Deploy in the upper-right corner, and then click Publish Now. You are redirected to the application management page.

    If a Git repository is not configured, the Publish Now button is disabled.
  2. Select a runtime environment for your application and a deployment method in the Cloud Resource Configuration section:

    • New ECS: Creates a preconfigured ECS instance. The default configuration is an ecs.u1-c1m1.large instance (2 vCPUs, 2 GiB) with Alibaba Cloud Linux 3 pre-installed.

    • Use Existing ECS: Deploys the application to an existing ECS instance.

      The ECS instance must run a Linux operating system.
  3. Click Create to start the automated deployment.

  4. Verify the deployment. After deployment begins, click View Progress. When the status changes to Successful, click the Application Access Endpoint to access your application.

Update a published application

After modifying the code in a chat session, click Publish Now again in the publish panel. The system automatically pulls the latest code and redeploys the application.

Roll back to a previous version

  1. Above the chat input box, click the image icon.

  2. Find the desired version in the history and click Roll back to this version.

FAQ

Git authorization failure

This error occurs if your Git authorization has expired or your permissions have changed. Go to the App Generation console, click Settings, and then click Specifications. Reauthorize your GitHub or Gitee account.

Dependency installation failure

  1. Your application's package.json file may contain private npm dependencies that cannot be downloaded during cloud builds. Make sure all dependencies are publicly accessible.

  2. Network fluctuations in the build environment can also cause this issue. Try publishing the application again.

Application unreachable after deployment

  1. Check the security group rules for the ECS instance. Ensure that inbound traffic from the internet is allowed on port 80 or 443.

  2. In the Build Progress and Logs section, check the application runtime logs for errors and to confirm that the application process has started.

Publishing process timeout

Complex builds may time out on low-specification ECS instances. To resolve this, select a higher-specification instance during deployment.