-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: [Task]: 更新 create-steedos-app 中的项目模版到微服务架构 #4712
- Loading branch information
1 parent
5f4812d
commit b3dd929
Showing
25 changed files
with
385 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/create-steedos-app/templates/default/.vscode/extensions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"redhat.vscode-yaml", "steedos.steedosdx-vscode", "mongodb.mongodb-vscode" | ||
"redhat.vscode-yaml", "steedos.steedosdx-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/create-steedos-app/templates/default/.vscode/tasks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Install Steedos DX", | ||
"type": "shell", | ||
"command": "echo Please Install Steedos DX Extensions", | ||
"linux": { | ||
"command": "npx json5 .vscode/extensions.json | npx json-cli-tool --path=recommendations --output=newline | xargs -L 1 code --install-extension", | ||
}, | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "new" | ||
}, | ||
"runOptions": { | ||
"runOn": "folderOpen" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:14-slim | ||
|
||
RUN apt-get update || : && apt-get install -y \ | ||
python \ | ||
curl \ | ||
build-essential | ||
|
||
WORKDIR /app | ||
|
||
ADD .env . | ||
ADD lerna.json . | ||
ADD package.json . | ||
ADD steedos.config.js . | ||
ADD steedos-packages . | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN yarn --production | ||
|
||
CMD ["yarn", "start"] |
65 changes: 48 additions & 17 deletions
65
packages/create-steedos-app/templates/default/README-template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,64 @@ | ||
This is a [Steedos](https://www.steedos.com/) project bootstrapped with [`create-steedos-app`](https://github.com/steedos/steedos-platform/tree/master/packages/create-steedos-app). | ||
华炎魔方模版项目 | ||
=== | ||
|
||
## Getting Started | ||
<p align="center"> | ||
<a href="./README_en.md">English</a> | ||
<a href="https://www.steedos.cn/docs/"> · 文档</a> | ||
<a href="https://www.steedos.cn/videos/"> · 视频</a> | ||
<a href="https://demo.steedos.cn"> · 试用</a> | ||
</p> | ||
|
||
### Start mongodb & redis service | ||
|
||
<p align="center" style="border-top: solid 1px #cccccc"> | ||
华炎魔方是 <a href="https://developer.salesforce.com/developer-centers/developer-experience" target="_blank">Salesforce Developer Experience (DX)</a> 的开源替代方案,将低代码技术与 <a href="https://www.steedos.cn/docs/deploy/devops"> DevOps 工具</a> 结合,实现敏捷开发的新高度。 | ||
</p> | ||
|
||
<h3 align="center"> | ||
🤖 🎨 🚀 | ||
</h3> | ||
|
||
|
||
# 快速向导 | ||
|
||
## 启动华炎魔方 | ||
|
||
开发软件包之前,先启动花华炎魔方服务。 | ||
|
||
1. 将 .env 复制为 .env.local,并修改相关配置参数。 | ||
2. 使用 docker 启动华炎魔方。 | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
### Start steedos service | ||
## 访问华炎魔方 | ||
|
||
```bash | ||
yarn | ||
yarn start | ||
``` | ||
打开浏览器,访问 http://127.0.0.1:5000,进入华炎魔方。 | ||
|
||
Open [http://localhost:5000](http://localhost:5000) with your browser to see the result. | ||
进入设置应用,可以: | ||
- 创建自定义对象 | ||
- 创建应用 | ||
- 创建微页面 | ||
|
||
## Learn More | ||
## 开发软件包 | ||
|
||
To learn more about Steedos Platform, take a look at the following resources: | ||
可以使用微服务的方式扩展华炎魔方。可以参考 services 文件夹下的例子。 | ||
|
||
- [Steedos Documentation](https://www.steedos.com/docs) - learn about Steedos features and API. | ||
- [Steedos Examples](https://github.com/steedos/steedos-examples) - Enjoy our selection of steedos examples to learn from or incorporate into your project. | ||
```bash | ||
yarn | ||
yarn start | ||
``` | ||
|
||
You can check out [the Steedos GitHub repository](https://github.com/steedos/steedos-platform/) - your feedback and contributions are welcome! | ||
## 使用 Node-RED | ||
|
||
## Deploy your project | ||
[Node-Red](https://nodered.org/) 是 IBM 开源的服务端低代码开发工具,提供了可视化的开发环境,开发华炎魔方微服务。 | ||
|
||
The easiest way to deploy your Steedos app is to use the [Docker Template](https://github.com/steedos/docker). | ||
- 创建定时任务 | ||
- 自定义微服务 | ||
- 自定义API | ||
- 自定义触发器 | ||
- 接收和推送消息 | ||
|
||
Check out our [Steedos deployment documentation](https://www.steedos.com/docs/deploy/getting-started) for more details. | ||
```bash | ||
yarn nodered | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,44 @@ | ||
# 参考 https://www.steedos.cn/docs/deploy/steedos-config | ||
|
||
PORT=5000 | ||
ROOT_URL=http://127.0.0.1:5000 | ||
TRANSPORTER=redis://127.0.0.1:6379 | ||
CACHER=redis://127.0.0.1:6379/1 | ||
TRANSPORTER=nats://127.0.0.1:4222 | ||
CACHER=redis://127.0.0.1:6379 | ||
MONGO_URL=mongodb://127.0.0.1:27017/steedos | ||
MONGO_OPLOG_URL=mongodb://127.0.0.1:27017/local | ||
# NODE_ENV=development | ||
|
||
STEEDOS_NODEID=steedos-primary | ||
# STEEDOS_CFS_STORE=local | ||
# STEEDOS_STORAGE_DIR=./storage | ||
|
||
STEEDOS_CFS_STORE=local | ||
STEEDOS_STORAGE_DIR=./storage | ||
# 初始安装的软件包 | ||
# STEEDOS_INITIAL_PACKAGES=@steedos-labs/project-ee,@steedos-labs/demo-ee,@steedos-labs/flows | ||
|
||
# 身份验证 | ||
STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN=true | ||
STEEDOS_TENANT_TOKEN_SECRET=change-me | ||
# STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN=true | ||
# STEEDOS_TENANT_TOKEN_SECRET= | ||
# STEEDOS_TENANT_ENABLE_REGISTER=true | ||
|
||
# VSCode 代码同步 | ||
# METADATA_SERVER= | ||
# METADATA_APIKEY= | ||
|
||
# 启用 Steedos ID 统一身份认证。 | ||
# STEEDOS_IDENTITY_OIDC_ENABLED=true | ||
# STEEDOS_IDENTITY_OIDC_ISSUER=https://id.steedos.cn/realms/master | ||
# STEEDOS_IDENTITY_OIDC_CONFIG_URL=https://id.steedos.cn/realms/master/.well-known/openid-configuration | ||
# STEEDOS_IDENTITY_OIDC_CLIENT_ID=steedos-oidc-public | ||
# STEEDOS_IDENTITY_OIDC_CLIENT_SECRET=none | ||
# STEEDOS_IDENTITY_OIDC_NAME=Steedos ID | ||
|
||
# Node-RED 配置 | ||
# NODERED_CREDENTIAL_SECRET=steedos | ||
|
||
# 配置资产包 CDN 服务的网址 | ||
# STEEDOS_UNPKG_URL=https://unpkg.steedos.cn | ||
|
||
# 绑定华炎云账户 | ||
STEEDOS_CLOUD_API_KEY= | ||
STEEDOS_CLOUD_SPACE_ID= | ||
# 配置 Amis 当前引用的版本号 | ||
# STEEDOS_AMIS_VERSION=2.7.2 | ||
|
||
# vscode 代码同步 | ||
METADATA_SERVER= | ||
METADATA_APIKEY= | ||
# 配置资产包的地址,多个资产包用,隔开 | ||
# STEEDOS_PUBLIC_PAGE_ASSETURLS=https://unpkg.steedos.cn/@steedos-widgets/amis-object@1.1/dist/assets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
image: ecr.aws.steedos.cn/dockerhub/steedos/gitpod-workspace-base:2.2.3 | ||
|
||
# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/ | ||
ports: | ||
- port: 5000 | ||
onOpen: ignore | ||
visibility: public | ||
- port: 6379 | ||
onOpen: ignore | ||
- port: 27017 | ||
onOpen: ignore | ||
visibility: public | ||
- port: 4222 | ||
onOpen: ignore | ||
- port: 8222 | ||
onOpen: ignore | ||
|
||
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/ | ||
tasks: | ||
- name: Docker | ||
command: | | ||
echo "ROOT_URL=$(gp url 5000)" >> .env.local | ||
echo "METADATA_SERVER=$(gp url 5000)" >> .env.local | ||
yarn | ||
docker-compose up | ||
- name: Nodejs Services | ||
command: | | ||
gp await-port 5000 | ||
yarn start | ||
- name: Node-RED | ||
command: | | ||
gp await-port 5000 | ||
yarn nodered | ||
vscode: | ||
extensions: | ||
- redhat.vscode-yaml | ||
- steedos.steedosdx-vscode | ||
- steedos.steedosdx-vscode-core | ||
- ms-ceintl.vscode-language-pack-zh-hans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"packages": [ | ||
"services/*" | ||
], | ||
"version": "0.0.1", | ||
"useNx": false | ||
} |
Oops, something went wrong.