Skip to content

Commit

Permalink
Give an alert to Rails to Go migration (#632)
Browse files Browse the repository at this point in the history
* Add a important info to readme

* Update readme to add a warning info for Rails to Gin migrate
  • Loading branch information
hiveer authored Sep 15, 2024
1 parent a18942d commit 375a7bb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
**[简体中文](/docs/readme_cn.md)[English](/docs/readme_en.md)[日本語](/docs/readme_ja.md)[한국어](/docs/readme_kr.md)**

> [!WARNING]
CSGHub Portal has migrated the web framework from Rails to Gin. If you're using our Rails version before, you may need to refer to our new documents [migrate to Gin](/docs/migrate_to_gin_version_portal_en.md) to see how to migrate to Gin version.

## CSGHub README

CSGHub is an open source, trustworthy large model asset management platform that can assist users in governing the assets involved in the lifecycle of LLM and LLM applications (datasets, model files, codes, etc).
Expand Down
20 changes: 20 additions & 0 deletions docs/migrate_to_gin_version_portal_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 迁移到 Gin 版本

首先我们假设,你已经有一个 Rails 版本的 CSGHub Portal 部署好了。

## 拉取最新的仓库,默认使用 Gin 版本

```bash
git fetch origin
git reset --hard origin/main
```

通过这个代码,你可以把本地的 main 分支重置为远程的 main 分支,同时你也会拉取一个名为 'rails-main' 的分支,这个分支中包含了旧的 Rails 版本的代码。

## 部署你的 Gin server
请参考[Setup](setup_en.md) 来部署你的 Gin 服务器。是的,默认情况下 Gin 会使用 8090 端口。

### 数据库设置
你可以通过环境变量 CSGHUB_PORTAL_DATABASE_DSN 来设置数据库连接。你可以使用和 Rails 版本相同的数据库,因为我们已经完成了兼容性考虑。

需要注意的是默认的数据库URL是:“postgresql://postgres:postgres@localhost:5432/starhub_portal?”sslmode=disable"这可能与您的Rails服务器有不同的数据库名称,您可能需要更新它在本地运行。
20 changes: 20 additions & 0 deletions docs/migrate_to_gin_version_portal_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Migrate to Gin

Let's assume that you already have a Rails version Portal deployed before.

## Pull the latest repo with Gin version as default

```bash
git fetch origin
git reset --hard origin/main
```

By doing this, you will use the remote latest main branch to overwrite your local main branch. You also fetch the 'rails-main' branch to local in which you can see the old Rails version code.

## Deploy your Gin server
Please refer to [Setup](setup_en.md) to deploy your Gin server. Yes, you should deloy a new server by default Gin will use 8090 port.

### DB config
You can setup the DB url by ENV variable: CSGHUB_PORTAL_DATABASE_DSN. And you can use the same database used by your Rails server, as we have completed the compatibility considerations.

One thing to note is the default database URL which is: "postgresql://postgres:postgres@localhost:5432/starhub_portal?sslmode=disable" which may have a different database name to your Rails server, you may need to update it which running it locally.
4 changes: 4 additions & 0 deletions docs/readme_cn.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
**[English](/docs/readme_en.md)[简体中文](/docs/readme_cn.md)[日本語](/docs/readme_ja.md)[한국어](/docs/readme_kr.md)**

> [!WARNING]
CSGHub Portal 将 web 框架从 Rails 迁移到 Gin。如果你之前在使用我们的 Rails 版本,你可能需要参考我们的新文档[migrate to Gin](/docs/migrate_to_gin_version_portal_en.md)来了解如何迁移到Gin版本。

## CSGHub说明文档

CSGHub是一个开源、可信的大模型资产管理平台,可帮助用户治理LLM和LLM应用生命周期中涉及到的资产(数据集、模型文件、代码等)。基于CSGHub,用户可以通过Web界面、Git命令行或者自然语言Chatbot等方式,实现对模型文件、数据集、代码等资产的操作,包括上传、下载、存储、校验和分发;同时平台提供微服务子模块和标准化API,便于用户与自有系统集成。
Expand Down

0 comments on commit 375a7bb

Please sign in to comment.