mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
feat: add gitpod support (#6922)
This commit is contained in:
parent
40d36af75b
commit
c13560c919
76
.gitpod.yml
76
.gitpod.yml
@ -1,13 +1,71 @@
|
||||
# This configuration file was automatically generated by Gitpod.
|
||||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
|
||||
# and commit this file to your remote git repository to share the goodness with others.
|
||||
|
||||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
|
||||
|
||||
image: gitpod/workspace-postgres
|
||||
env:
|
||||
DB_DIALECT: "mysql"
|
||||
DB_HOST: "localhost"
|
||||
DB_PORT: "5432"
|
||||
DB_DATABASE: "nocobase"
|
||||
DB_USER: "nocobase"
|
||||
DB_PASSWORD: "nocobase"
|
||||
APP_PORT: "13000"
|
||||
DB_CONTAINER_NAME: "nocobase-db"
|
||||
|
||||
tasks:
|
||||
- init: yarn install && yarn run build
|
||||
command: yarn run start
|
||||
|
||||
- name: Start MySQL
|
||||
before: |
|
||||
container_id=$(docker ps --all --quiet --filter "name=${DB_CONTAINER_NAME}")
|
||||
if [ -z "${container_id}" ]; then
|
||||
docker create --name ${DB_CONTAINER_NAME} -p "${DB_PORT}:3306" \
|
||||
-e MYSQL_ROOT_PASSWORD="${DB_PASSWORD}" \
|
||||
-e MYSQL_DATABASE="${DB_DATABASE}" \
|
||||
-e MYSQL_USER="${DB_USER}" \
|
||||
-e MYSQL_PASSWORD="${DB_PASSWORD}" \
|
||||
mysql:8 \
|
||||
--character-set-server=utf8mb4 \
|
||||
--collation-server=utf8mb4_unicode_ci
|
||||
fi
|
||||
docker start "${DB_CONTAINER_NAME}"
|
||||
command: |
|
||||
echo "Database started"
|
||||
gp sync-done db-ready
|
||||
exit 0
|
||||
|
||||
- name: Setup Environment
|
||||
init: |
|
||||
cat > .env << EOL
|
||||
DB_DIALECT=mysql
|
||||
DB_HOST=${DB_HOST}
|
||||
DB_PORT=${DB_PORT}
|
||||
DB_DATABASE=${DB_DATABASE}
|
||||
DB_USER=${DB_USER}
|
||||
DB_PASSWORD=${DB_PASSWORD}
|
||||
NOCOBASE_PKG_USERNAME=
|
||||
NOCOBASE_PKG_PASSWORD=
|
||||
EOL
|
||||
command: |
|
||||
echo "Environment configured"
|
||||
gp sync-done env-ready
|
||||
exit 0
|
||||
|
||||
- name: Install Dependencies
|
||||
init: |
|
||||
yarn install
|
||||
yarn nocobase install
|
||||
command: |
|
||||
echo "Dependencies installed"
|
||||
gp sync-done deps-ready
|
||||
exit 0
|
||||
|
||||
- name: Start Application
|
||||
command: |
|
||||
gp sync-await db-ready
|
||||
gp sync-await env-ready
|
||||
gp sync-await deps-ready
|
||||
yarn dev
|
||||
|
||||
ports:
|
||||
- port: 5432
|
||||
onOpen: ignore
|
||||
visibility: private
|
||||
- port: 13000
|
||||
onOpen: open-preview
|
||||
visibility: public
|
@ -30,6 +30,12 @@ https://www.nocobase.com/ja/tutorials
|
||||
顧客のストーリー:
|
||||
https://www.nocobase.com/ja/blog/tags/customer-stories
|
||||
|
||||
## クイックスタート
|
||||
|
||||
Gitpodを使用すると、すぐに使える開発環境を構築できます。
|
||||
|
||||
[](https://gitpod.io/#https://github.com/nocobase/nocobase)
|
||||
|
||||
## リリースノート
|
||||
|
||||
リリースノートは[ブログ](https://www.nocobase.com/ja/blog/timeline)で随時更新され、週ごとにまとめて公開しています。
|
||||
|
@ -30,6 +30,11 @@ https://www.nocobase.com/en/tutorials
|
||||
Use Cases:
|
||||
https://www.nocobase.com/en/blog/tags/customer-stories
|
||||
|
||||
## Quickstart
|
||||
|
||||
To get a quick working development environment you could use Gitpod.
|
||||
|
||||
[](https://gitpod.io/#https://github.com/nocobase/nocobase)
|
||||
|
||||
## Release Notes
|
||||
|
||||
|
@ -30,6 +30,12 @@ https://www.nocobase.com/cn/tutorials
|
||||
用户故事:
|
||||
https://www.nocobase.com/cn/blog/tags/customer-stories
|
||||
|
||||
## 快速入门
|
||||
|
||||
要获得快速工作的开发环境,您可以使用 Gitpod。
|
||||
|
||||
[](https://gitpod.io/#https://github.com/nocobase/nocobase)
|
||||
|
||||
## 发布日志
|
||||
我们的[博客](https://www.nocobase.com/cn/blog/timeline)会及时更新发布日志,并每周进行汇总。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user