add zh-cn version

This commit is contained in:
yajing wang
2025-12-11 18:06:06 +08:00
parent 543328fa6e
commit 6ec7f214cb
13 changed files with 602 additions and 106 deletions

View File

@@ -6,7 +6,7 @@ description: Deploy a single-container Docker app to Olares using Studio.
This guide explains how to deploy a single-container Docker app to Olares using Studio.
:::info For single-container apps
This method supports apps that run from a single container image. For multi-container apps (for example, a web service plus a separate database), use the workflow in the [developer documentation](index.md) instead.
This method supports apps that run from a single container image.
:::
:::tip Recommended for testing
Studio-created deployments are best suited for development, testing, or temporary use. Upgrades and long-term data persistence can be limited compared to installing a packaged app from the Market. For production use, consider [packaging and uploading the app](package-upload.md) and installing it via the Market.
@@ -44,7 +44,6 @@ services:
- "8282:80/tcp"
environment:
TZ: 'America/Toronto'
# Volumes store your data between container upgrades
volumes:
- './db:/var/www/html/db'
- './logos:/var/www/html/images/uploads/logos'
@@ -67,7 +66,7 @@ These fields define the app's core components. You can find this information as
:::
3. For **Instance Specifications**, enter the minimum CPU and memory requirements. For example:
- **CPU**: 2 core
- **Memory**: 1 G
- **Memory**: 1 Gi
![Deploy Wallos](/images/manual/olares/studio-deploy-wallos.png#bordered)
### Add environment variables
@@ -83,7 +82,7 @@ Environment variables are used to pass configuration settings to your app. In th
Volumes connect storage on your Olares device to a path inside the app's container, which is essential for saving data permanently. These are defined using the `-v` flag or in the `volumes:` section.
:::info Host path options
The host path is where Olares stores the data, and the mount path is the path inside the container. Olares provides three managed host path prefixes:
The host path is where Olares stores the data, and the mount path is the path inside the container. Studio provides three managed host path prefixes:
- `/app/data`: App data directory. Data can be accessed across nodes and is not deleted when the app is uninstalled. Appears under `/Data/studio` in Files.
- `/app/cache`: App cache directory. Data is stored in the node's local disk and is deleted when the app is uninstalled. Appears under `/Cache/<device-name>/studio` in Files.
@@ -96,15 +95,23 @@ The host path is where Olares stores the data, and the mount path is the path in
This app requires two volumes. You will add them one by one.
1. Add the database volume. This data is for high-frequency I/O and does not need to be saved permanently. Map it to `/app/cache` so it will be automatically deleted when the app is uninstalled.
1. Click **Add** next to **Storage Volume**.
2. For **Host path**, select `/app/cache`, then enter `/db`.
3. For **Mount path**, enter `/var/www/html/db`.
4. Click **Submit**.
2. Add the logo volume. This is user-uploaded data that should be persistent and reusable, even if the app is reinstalled. Map it to `/app/data`.
1. Click **Add** next to **Storage Volume**.
2. For **Host path**, select `/app/data`, then enter `/logos`.
3. For **Mount path**, enter `/var/www/html/images/uploads/logos`
4. Click **Submit**.
a. Click **Add** next to **Storage Volume**.
b. For **Host path**, select `/app/cache`, then enter `/db`.
c. For **Mount path**, enter `/var/www/html/db`.
d. Click **Submit**.
2. Add the logo volume. This is user-uploaded data that should be persistent and reusable, even if the app is reinstalled. Map it to `/app/data`.
a. Click **Add** next to **Storage Volume**.
b. For **Host path**, select `/app/data`, then enter `/logos`.
c. For **Mount path**, enter `/var/www/html/images/uploads/logos`.
d. Click **Submit**.
![Add volumes](/images/manual/olares/studio-add-storage-volumes.png#bordered)
You can check Files later to verify the mounted paths.
@@ -118,37 +125,36 @@ If your app needs Postgres or Redis, enable it under **Instance Specifications**
![Enable databases](/images/manual/olares/studio-enable-databases.png#bordered)
When enabled, Studio provides dynamic variables. You must use these variables in the **Environment Variables** section for your app to connect to the database.
- **Postgres variables:**
- **Postgres variables**
| Variables | Description |
|--------------|-----------------------|
| $(PG_USER) | PostgreSQL username |
| $(PG_DBNAME) | Database name |
| $(PG_PASS) | Postgres Password |
| $(PG_HOST) | Postgres service host |
| $(PG_PORT) | Postgres service port |
| Variables | Description |
|----------------|-----------------------|
| `$(PG_USER)` | PostgreSQL username |
| `$(PG_DBNAME)` | Database name |
| `$(PG_PASS)` | Postgres Password |
| `$(PG_HOST)` | Postgres service host |
| `$(PG_PORT)` | Postgres service port |
- **Redis variables:**
- **Redis variables**
| Variables | Description |
|---------------|--------------------|
| $(REDIS_HOST) | Redis service host |
| $(REDIS_PORT) | Redis service port |
| $(REDIS_USER) | Redis username |
| $(REDIS_PASS) | Redis password |
| Variables | Description |
|-----------------|--------------------|
| `$(REDIS_HOST)` | Redis service host |
| `$(REDIS_PORT)` | Redis service port |
| `$(REDIS_USER)` | Redis username |
| `$(REDIS_PASS)` | Redis password |
### Generate the app project
1. Once all your configurations are set, click **Create**. This generates the app's project files.
2. After creation, Studio generates the package files for your app, and then automatically deploys the app. You can check the status in the bottom bar.
3. When the app is successfully deployed, click **Preview** in the top-right corner to launch it.
![Preveiw wallos](/images/manual/olares/studio-preview-wallos.png#bordered)
![Preveiw Wallos](/images/manual/olares/studio-preview-wallos.png#bordered)
## Review the package files and test the app
Apps deployed from Studio include a `-dev` suffix in the title to distinguish them from Market installations.
![Check deployed app](/images/manual/olares/studio-app-with-dev-suffix.png#bordered)
You can click on files like `OlaresManifest.yaml` to review and make changes. For example, to change the app's display name and logo.
You can click on files like `OlaresManifest.yaml` to review and make changes. For example, to change the app's display name and logo:
1. Click **<span class="material-symbols-outlined">box_edit</span>Edit** in the top-right to open the editor.
2. Click `OlaresManifest.yaml` to view the content.
@@ -164,7 +170,6 @@ You can click on files like `OlaresManifest.yaml` to review and make changes. Fo
:::
![Change app icon](/images/manual/olares/studio-change-app-icon1.png#bordered)
## Uninstall or delete the app
If you no longer need the app, you can remove it.
1. Click <span class="material-symbols-outlined">more_vert</span> in the top-right corner.
@@ -175,12 +180,11 @@ If you no longer need the app, you can remove it.
## Troubleshoot a deployment
### Cannot install the app
If installation fails, review the error at the bottom of the page and click **View** to expand details.
![Check app status](/images/manual/olares/studio-check-app-status.png#bordered)
If installation fails, review the error at the bottom of the page and click **View** to check details.
### Run into issues when the app is running
Once running, you can manage the app from its deployment details page in Studio. The interface of this page is similar to Control Hub. If details don't appear, refresh the page.
You can:
- Use the **Stop** and **Restart** controls to retry. This action can often resolve runtime issues like a frozen process.
- Use the **Stop** or **Restart** controls to retry. This action can often resolve runtime issues like a frozen process.
- Check events or logs to investigate runtime errors. See [Export container logs for troubleshooting](../../../manual/olares/controlhub/manage-container.md#export-container-logs-for-troubleshooting) for details.
![App deployment details](/images/manual/olares/studio-app-deployment-details.png#bordered)

View File

@@ -6,9 +6,6 @@ description: Learn how to use Studio to set up a dev container, access it via VS
Olares Studio allows you to spin up a pre-configured dev container to write and debug code (such as Node.js scripts or CUDA programs) without managing local infrastructure. This provides an isolated environment identical to the production runtime.
The following guide shows the setup workflow using a Node.js project as an example.
:::info
This workflow is optimized for iterative coding and testing. If you intend to publish the application to the Olares Market, you must create your own image and follow the [developer documentation](../submit/index.md) for final configuration.
:::
## Prerequisite
- Olares version 1.12.2 or later.
@@ -56,7 +53,7 @@ If you prefer your local settings and extensions, you can tunnel into the contai
code tunnel
```
5. Follow the terminal prompts to authenticate using a Microsoft or GitHub account via the provided URL.
6. Assign a name to the tunnel when prompted (e.g., `myapp-demo`). This will output a vscode.dev URL tied to this remote workspace.
6. Assign a name to the tunnel when prompted (e.g., `myapp-demo`). This will output a `vscode.dev` URL tied to this remote workspace.
![Create a secure tunnel](/images/manual/olares/studio-create-a-secure-tunnel.png#bordered)
7. Open VS Code on your local machine, click the **><** icon in the bottom-left, and select **Tunnel**.
@@ -183,6 +180,9 @@ You can follow the same steps to modify `OlaresManifest.yaml` and `deployment.ya
- name: "80"
port: 80
targetPort: 80
- name: myweb-dev-8080
port: 8080
targetPort: 8080
# Add the following
- name: myweb-dev-8081 # Must match entrance name
port: 8081
@@ -195,10 +195,10 @@ You can follow the same steps to modify `OlaresManifest.yaml` and `deployment.ya
4. Click **Apply** to redeploy the container.
You can verify the active ports in **Services** > **Ports**.
Once deployed, go to **Services** > **Ports**. You can see your new port listed here.
![Verify active ports](/images/manual/olares/studio-verify-active-ports.png#bordered)
### Verify the new port
### Test the connection
1. Update `index.js` to listen on the new port:
```js
const express = require('express');

View File

@@ -9,7 +9,7 @@ Studio provides a real Olares environment for building, porting, and testing app
-Package your app into a chart and download it when your app is ready.
## Access Studio
Studio is available in Olares Market and must be installed manually.
You must manually install Studio:
1. Open **Market**, and search for "Studio".
![Studio](/images/manual/olares/studio.png#bordered)
@@ -23,4 +23,4 @@ The sidebar and **Home** page organize your main tasks in Studio:
- **Applications**: A list of apps you have created and deployed with Studio.
- **Start**: You can start deploying or developing apps, or uploading an app from a local chart file.
![Understand Studio user interface](/images/manual/olares/studio-ui.png#bordered)
![Understand Studio user interface](/images/manual/olares/studio-ui.png#bordered)

View File

@@ -8,7 +8,7 @@ Apps created in Studio are ideal for development and testing. For stable, long-t
## Download the App package from Studio
After confirming that your app works as expected, you can download its complete installation package.
After confirming that your app works as expected, you can download its complete installation package:
1. Open your app project in **Studio**.
2. Click <span class="material-symbols-outlined">more_vert</span> in the top-right corner.
@@ -24,6 +24,4 @@ After confirming that your app works as expected, you can download its complete
Once finished, you can click **Open** to launch it.
All custom-installed apps will appear under the **My Olares** > **Upload** tab.
All custom-installed apps will appear under the **My Olares** > **Upload** tab.