refactor: ./apps/*

This commit is contained in:
Sun-ZhenXing
2026-01-01 18:32:10 +08:00
parent 9c25970445
commit 922068b8af
37 changed files with 274 additions and 241 deletions

View File

@@ -0,0 +1,17 @@
# Bolt.diy Configuration
# For more information, visit: https://github.com/stackblitz-labs/bolt.diy
# Container port override
# BOLT_DIY_PORT_OVERRIDE=5173
# Log level (trace, debug, info, warn, error)
# VITE_LOG_LEVEL=info
# Enable experimental features
# ENABLE_EXPERIMENTAL_FEATURES=false
# Bolt.diy version
# BOLT_DIY_VERSION=latest
# Timezone
# TZ=UTC

57
apps/bolt-diy/README.md Normal file
View File

@@ -0,0 +1,57 @@
# Bolt.diy
Bolt.diy is an AI-powered web IDE that enables you to build full-stack web applications directly in your browser. It combines the power of AI with a modern development environment to streamline your development workflow.
## Quick Start
```bash
docker compose up -d
```
Access Bolt.diy at [http://localhost:5173](http://localhost:5173)
## Features
- **AI-Powered Development**: Leverage AI to assist with code generation and development
- **Full-Stack Development**: Build complete web applications with frontend and backend capabilities
- **Real-time Preview**: See your changes in real-time as you develop
- **Built-in Terminal**: Execute commands directly within the IDE
- **Git Integration**: Manage your repositories within the IDE
## Configuration
### Environment Variables
| Variable | Default | Description |
| ------------------------------ | ------- | ------------------------------------------- |
| `BOLT_DIY_PORT_OVERRIDE` | 5173 | Host port for accessing Bolt.diy |
| `BOLT_DIY_VERSION` | latest | Docker image version |
| `VITE_LOG_LEVEL` | info | Log level (trace, debug, info, warn, error) |
| `ENABLE_EXPERIMENTAL_FEATURES` | false | Enable experimental features |
| `TZ` | UTC | Timezone |
### Port Mapping
- **5173**: Bolt.diy web interface
## Volume
The container uses in-memory storage for the development environment. For persistent storage, you can mount volumes as needed.
## Health Check
The service includes a health check that monitors the availability of the web interface.
## Resource Limits
- **CPU**: 2 cores (limit) / 0.5 cores (reservation)
- **Memory**: 2GB (limit) / 512MB (reservation)
## Documentation
- [Official Bolt.diy Repository](https://github.com/stackblitz-labs/bolt.diy)
- [Bolt.diy Documentation](https://docs.bolt.new/)
## License
Refer to the [Bolt.diy License](https://github.com/stackblitz-labs/bolt.diy/blob/main/LICENSE)

View File

@@ -0,0 +1,57 @@
# Bolt.diy
Bolt.diy 是一个由 AI 驱动的网页版 IDE让你可以直接在浏览器中构建全栈 web 应用程序。它将 AI 的强大功能与现代开发环境相结合,以简化你的开发工作流程。
## 快速开始
```bash
docker compose up -d
```
在 [http://localhost:5173](http://localhost:5173) 访问 Bolt.diy
## 功能特性
- **AI 驱动开发**:利用 AI 辅助代码生成和开发
- **全栈开发**:构建具有前端和后端功能的完整 web 应用程序
- **实时预览**:在开发时实时查看你的更改
- **内置终端**:直接在 IDE 中执行命令
- **Git 集成**:在 IDE 中管理你的代码库
## 配置
### 环境变量
| 变量 | 默认值 | 说明 |
| ------------------------------ | ------ | ------------------------------------------- |
| `BOLT_DIY_PORT_OVERRIDE` | 5173 | 访问 Bolt.diy 的主机端口 |
| `BOLT_DIY_VERSION` | latest | Docker 镜像版本 |
| `VITE_LOG_LEVEL` | info | 日志级别trace、debug、info、warn、error |
| `ENABLE_EXPERIMENTAL_FEATURES` | false | 启用实验性功能 |
| `TZ` | UTC | 时区 |
### 端口映射
- **5173**Bolt.diy web 界面
## 存储卷
容器为开发环境使用内存存储。如需持久化存储,可根据需要挂载卷。
## 健康检查
该服务包含一个健康检查,监控 web 界面的可用性。
## 资源限制
- **CPU**2 核心(上限)/ 0.5 核心(预留)
- **内存**2GB上限/ 512MB预留
## 文档
- [Bolt.diy 官方仓库](https://github.com/stackblitz-labs/bolt.diy)
- [Bolt.diy 文档](https://docs.bolt.new/)
## 许可证
参考 [Bolt.diy 许可证](https://github.com/stackblitz-labs/bolt.diy/blob/main/LICENSE)

View File

@@ -0,0 +1,40 @@
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
bolt-diy:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}stackblitz/bolt:${BOLT_DIY_VERSION:-latest}
ports:
- "${BOLT_DIY_PORT_OVERRIDE:-5173}:5173"
environment:
- TZ=${TZ:-UTC}
- VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-info}
- ENABLE_EXPERIMENTAL_FEATURES=${ENABLE_EXPERIMENTAL_FEATURES:-false}
deploy:
resources:
limits:
cpus: ${BOLT_DIY_CPU_LIMIT:-2.00}
memory: ${BOLT_DIY_MEMORY_LIMIT:-2G}
reservations:
cpus: ${BOLT_DIY_CPU_RESERVATION:-0.5}
memory: ${BOLT_DIY_MEMORY_RESERVATION:-512M}
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:5173/",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s