diff --git a/apps/bytebase/2.11.2/.env.sample b/apps/bytebase/2.11.2/.env.sample new file mode 100644 index 00000000..e1c1621c --- /dev/null +++ b/apps/bytebase/2.11.2/.env.sample @@ -0,0 +1,8 @@ +CONTAINER_NAME="bytebase" +PANEL_APP_PORT_HTTP="40171" +PANEL_DB_NAME="bytebase" +POSTGRES_HOST="postgres" +PANEL_DB_USER_PASSWORD="password_xxJdZD" +POSTGRES_PORT="5432" +PANEL_DB_USER="postgres" +DATA_PATH="./data" diff --git a/apps/bytebase/2.11.2/data.yml b/apps/bytebase/2.11.2/data.yml new file mode 100644 index 00000000..b55823c2 --- /dev/null +++ b/apps/bytebase/2.11.2/data.yml @@ -0,0 +1,57 @@ +additionalProperties: + formFields: + - default: "" + edit: true + envKey: POSTGRES_HOST + key: postgresql + labelEn: Postgres database Service + labelZh: Postgres数据库服务 + required: true + type: service + - default: "5432" + edit: true + envKey: POSTGRES_PORT + labelEn: Postgres database Service Port + labelZh: Postgres数据库服务端口 + required: true + rule: paramPort + type: number + - default: bytebase + edit: true + envKey: PANEL_DB_NAME + labelEn: Database + labelZh: 数据库名 + required: true + rule: paramCommon + type: text + - default: "" + edit: true + envKey: PANEL_DB_USER + labelEn: User + labelZh: 数据库用户 + required: true + rule: paramCommon + type: text + - default: "" + edit: true + envKey: PANEL_DB_USER_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + required: true + rule: paramCommon + type: password + - default: 40171 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: ./data + edit: true + envKey: DATA_PATH + labelEn: Data storage folder + labelZh: 数据存放文件夹 + required: true + type: text diff --git a/apps/bytebase/2.11.2/docker-compose.yml b/apps/bytebase/2.11.2/docker-compose.yml new file mode 100644 index 00000000..4964c2cc --- /dev/null +++ b/apps/bytebase/2.11.2/docker-compose.yml @@ -0,0 +1,30 @@ +version: '3' +services: + bytebase: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:8080" + volumes: + - "${DATA_PATH}:/var/opt/bytebase" + init: true + healthcheck: + test: ["CMD", "curl", "--fail", "http://localhost:5678/healthz", "||", "exit", "1"] + interval: 5m + timeout: 60s + command: + - "--data" + - "/var/opt/bytebase" + - "--port" + - "8080" + - "--pg" + - "postgresql://${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${PANEL_DB_NAME}" + image: bytebase/bytebase:2.11.2 + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/bytebase/README.md b/apps/bytebase/README.md new file mode 100644 index 00000000..1fc46987 --- /dev/null +++ b/apps/bytebase/README.md @@ -0,0 +1,366 @@ +

+ + Bytebase + +

+ +

+ 🔥 Live Demo • + ⚙️ Install • + 📚 Docs • + 💬 Discord • + 🙋‍♀️ Book Demo +

+ +

+ + go report + + + Artifact Hub + + + Github Stars + +

+ +

+ Different database development tasks +

+ +

+ Multiple database systems +

+ +

+ Unified process +

+ +

+ Single tool +

+ +
+ +

+ +

+ +
+ +

+ +

+ +
+ +

+ +

+ +
+ +

🪜

+

Change

+

+ Want to formalize the database change process but don't know how? +

+ +| | | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| Standard Operating Procedure (SOP)
Standardize the database schema and data change process across different database systems, small or [large tables](https://www.bytebase.com/docs/change-database/online-schema-migration-for-mysql) and [different tenants](https://www.bytebase.com/docs/change-database/batch-change/#change-databases-from-multiple-tenants).

SQL Review
[100+ lint rules](https://www.bytebase.com/docs/sql-review/review-rules) to detect SQL anti-patterns and enforce consistent SQL style in the organization.

GitOps
[Point-and-click GitHub and GitLab integration](https://www.bytebase.com/docs/vcs-integration/overview) to enable GitOps workflow for changing database. | | + +
+ +

🔮

+

Query

+

+ Want to control the data access but don't know how? +

+ +| | | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| All-in-one SQL Editor
Web-based IDE specifically for performing SQL specific tasks.

Data Masking
State-of-the-art [column level masking](https://www.bytebase.com/docs/sql-editor/mask-data) engine to cover complex situations like subquery, CTE.

Data Access Control
Organization level policy to centralize the [data access control](https://www.bytebase.com/docs/security/data-access-control). | | + +
+ +

🔒

+

Secure

+

+ Want to avoid data leakage, change outage and detect malicious behavior but don't know how? +

+ +| | | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| Centralize Change, Query and Admin Tasks
A single place to perform different tasks on different databases, thus enforce policy and monitor activity accordingly.

RBAC
[Two-level RBAC model](https://www.bytebase.com/docs/concepts/roles-and-permissions) mapping to the organization wide privileges and application team privileges respectively.

Anomaly Center and Audit Logging
Capture all database [anomalies](https://www.bytebase.com/docs/administration/anomaly-center), user actions and system events and present them in a holistic view. | | + +
+ +

👩‍💼

+

Govern

+

+ Want to enforce organization policy but don't know how? +

+ +| | | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| Manage Database Resources
A single place to manage environments, database instances, database users for application development, with optional [Terraform integration](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs).

Policy Enforcement
Enforce organization wide SQL Review policy, backup policy and data access policy.

SQL Editor Admin mode
[CLI like experience](https://www.bytebase.com/docs/sql-editor/admin-mode) without setting up bastion. | | + +
+ +# 🖖 Intro + +Bytebase is a Database CI/CD solution for the Developers and DBAs. It's the **only database CI/CD project** included by the [CNCF Landscape](https://landscape.cncf.io/?selected=bytebase). The Bytebase family consists of these tools: + +- [Bytebase Console](https://bytebase.com/?source=github): A web-based GUI for developers and DBAs to manage the database development lifecycle. +- [Bytebase CLI (bb)](https://www.bytebase.com/docs/cli/overview): The CLI to help developers integrate database changes into the existing CI/CD workflow. +- [Bytebase GitHub App](https://github.com/marketplace/bytebase) and [SQL Review GitHub Action](https://github.com/marketplace/actions/sql-review): The GitHub App and GitHub Action to detect SQL anti-patterns and enforce a consistent SQL style guide during Pull Request. +- [Terraform Bytebase Provider](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs): The Terraform + provider enables team to manage Bytebase resources via Terraform. A typical setup involves teams using + Terraform to provision database instances from Cloud vendors, followed by using Bytebase provider to + prepare those instances ready for application use. + +| | Topic | +| --- | :------------------------------------------------------------------ | +| 🏗️ | [Installation](#-installation) | +| 🎮 | [Demo](#-demo) | +| 👩‍🏫 | [Tutorials](#-tutorials) | +| 💎 | [Design Principles](#-design-principles) | +| 🧩 | [Data Model](#-data-model) | +| 🎭 | [Roles](#-roles) | +| 🕊 | [Developing and Contributing](#-developing-and-contributing) | +| 🤺 | [Bytebase vs Alternatives](#-bytebase-vs-alternatives) | + +
+ +# 🏗️ Installation + +### One liner + +```bash +# One-liner installation script from latest release +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/bytebase/install/main/install.sh)" + +``` + +- [Build from source](https://www.bytebase.com/docs/get-started/install/build-from-source-code) +- [Docker](https://www.bytebase.com/docs/get-started/install/deploy-with-docker) +- [Kubernetes](https://www.bytebase.com/docs/get-started/install/deploy-to-kubernetes) +- [render.com](https://www.bytebase.com/docs/get-started/install/deploy-to-render) +- [Rainbond](https://www.bytebase.com/docs/get-started/install/deploy-to-rainbond) + +
+ +# 🎮 Demo + +Live demo at https://demo.bytebase.com + +You can also [book a 30min product walkthrough](https://cal.com/adela-bytebase/30min) with one of +our product experts. + +
+ +# 👩‍🏫 Tutorials + +Product tutorials are available at https://www.bytebase.com/tutorial. + +## Integrations + +- [Manage Supabase PostgreSQL](https://www.bytebase.com/docs/how-to/integrations/supabase) +- [Manage render PostgreSQL](https://www.bytebase.com/docs/how-to/integrations/render) +- [Manage Neon database](https://www.bytebase.com/docs/how-to/integrations/neon) +- [Deploy to sealos](https://www.bytebase.com/docs/get-started/install/deploy-to-sealos) +- [Deploy to Rainbond](https://www.bytebase.com/docs/get-started/install/deploy-to-rainbond) + +
+ +# 💎 Design Principles + +| | | | +| --- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 🪶 | Dependency Free | Start with a single command `./bytebase` without any external dependency. External PostgreSQL data store and others are optional. | +| 🔗 | Integration First | Solely focus on database management and leave the rest to others. We have native VCS integration with [GitHub/GitLab](https://www.bytebase.com/docs/vcs-integration/overview), [Terraform Provider](https://registry.terraform.io/providers/bytebase/bytebase/latest/docs), [webhook](https://www.bytebase.com/docs/change-database/webhook), and etc. | +| 💂‍♀️ | Engineering Disciplined | Disciplined [bi-weekly release](https://www.bytebase.com/changelog) and [engineering practice](https://github.com/bytebase/bytebase/blob/main/docs/life-of-a-feature.md). | + +
+ +# 🧩 Data Model + +More details in [Data Model Doc](https://www.bytebase.com/docs/concepts/data-model). + +

+ Data Model +

+ +
+ +# 🎭 Roles + +More details in [Roles and Permissions Doc](https://www.bytebase.com/docs/concepts/roles-and-permissions). + +Bytebase employs RBAC (Role-Based-Access-Control) and provides two role sets at the workspace and project level: + +- Workspace roles: `Owner`, `DBA`, `Developer`. The workspace role maps to the role in an engineering organization. +- Project roles: `Owner`, `Developer`. The project level role maps to the role in a specific team or project. + +Every user is assigned a workspace role, and if a particular user is involved in a particular project, then she will also be assigned a project role accordingly. + +Below diagram describes a typical mapping between an engineering org and the corresponding roles in the Bytebase workspace + +

+ Role Mapping +

+ +
+ +# 🕊 Developing and Contributing + +

+ Tech Stack +

+ +- Bytebase is built with a curated tech stack. It is optimized for **developer experience** and is very easy to start + working on the code: + + 1. It has no external dependency. + 1. It requires zero config. + 1. 1 command to start backend and 1 command to start frontend, both with live reload support. + +- Interactive code walkthrough + + - [Life of a schema change](https://sourcegraph.com/github.com/bytebase/bytebase/-/blob/docs/design/life-of-a-schema-change.snb.md) + - [SQL Review](https://sourcegraph.com/github.com/bytebase/bytebase/-/blob/docs/design/sql-review-source-code-tour.snb.md) + +- Follow [Life of a Feature](https://github.com/bytebase/bytebase/blob/main/docs/life-of-a-feature.md). + +## Dev Environment Setup + +### Prerequisites + +- [Go](https://golang.org/doc/install) (1.21.3 or later) +- [pnpm](https://pnpm.io/installation) +- [Air](https://github.com/bytebase/air) (**our forked repo @87187cc with the proper signal handling**). This is for backend live reload. + ```bash + go install github.com/bytebase/air@87187cc + ``` + +### Steps + +1. Pull source. + + ```bash + git clone https://github.com/bytebase/bytebase + ``` + +1. Create an external Postgres database on localhost. + + ```sql + CREATE USER bbdev SUPERUSER; + CREATE DATABASE bbdev; + ``` + +1. Start backend using air (with live reload). + + ```bash + PG_URL=postgresql://bbdev@localhost/bbdev air -c scripts/.air.toml + ``` + + Change the open file limit if you encounter "error: too many open files". + + ```bash + ulimit -n 10240 + ``` + + If you need additional runtime parameters such as --backup-bucket, please add them like this: + + ```bash + air -c scripts/.air.toml -- --backup-region us-east-1 --backup-bucket s3:\\/\\/example-bucket --backup-credential ~/.aws/credentials + ``` + +1. Start frontend (with live reload). + + ```bash + cd frontend && pnpm i && pnpm dev + ``` + + Bytebase should now be running at http://localhost:3000 and change either frontend or backend code would trigger live reload. + +### Tips + +* Use [Code Inspector](https://en.inspector.fe-dev.cn/guide/start.html#method1-recommend) to locate +frontend code from UI. Hold `Option + Shift` on Mac or `Alt + Shift` on Windows + + +
+ +# Bytebase vs Flyway, Liquibase + +- [Bytebase vs Liquibase](https://www.bytebase.com/blog/bytebase-vs-liquibase/) +- [Bytebase vs Flyway](https://www.bytebase.com/blog/bytebase-vs-flyway/) + +Either Flyway or Liquibase is a library and CLI focusing on schema change. While Bytebase is an one-stop +solution covering the entire database development lifecycle for Developers and DBAs to collaborate. + +Another key difference is Bytebase **doesn't** support Oracle and SQL Server. This is a conscious +decision we make so that we can focus on supporting other databases without good tooling support. +In particular, many of our users tell us Bytebase is by far the best (and sometimes the only) database +tool that can support their PostgreSQL and ClickHouse use cases. + +[![Star History Chart](https://api.star-history.com/svg?repos=bytebase/bytebase,liquibase/liquibase,flyway/flyway&type=Date)](https://star-history.com/#bytebase/bytebase&liquibase/liquibase&flyway/flyway&Date) + +# Bytebase vs Yearning, Archery + +Either Yearning or Archery provides a DBA operation portal. While Bytebase provides a collaboration +workspace for DBAs and Developers, and brings DevOps practice to the Database Change Management (DCM). +Bytebase has the similar `Project` concept seen in GitLab/GitHub and provides native GitOps integration +with GitLab/GitHub. + +Another key difference is Yearning, Archery are open source projects maintained by the individuals part-time. While Bytebase is open-sourced, it adopts an open-core model and is a commercialized product, supported +by a [fully staffed team](https://www.bytebase.com/about#team) [releasing new version every 2 weeks](https://www.bytebase.com/changelog). + +[![Star History Chart](https://api.star-history.com/svg?repos=bytebase/bytebase,cookieY/Yearning,hhyo/Archery&type=Date)](https://star-history.com/#bytebase/bytebase&cookieY/Yearning&hhyo/Archery&Date) + +# 👨‍👩‍👧‍👦 Community + +[![Hang out on Discord](https://img.shields.io/badge/%20-Hang%20out%20on%20Discord-5865F2?style=for-the-badge&logo=discord&labelColor=EEEEEE)](https://discord.gg/huyw7gRsyA) + +[![Follow us on Twitter](https://img.shields.io/badge/Follow%20us%20on%20Twitter-1DA1F2?style=for-the-badge&logo=twitter&labelColor=EEEEEE)](https://twitter.com/Bytebase) + +
+ +# 🤔 Frequently Asked Questions (FAQs) + +Check out our [FAQ](https://www.bytebase.com/docs/faq). + +
+ +# 🙋 Contact Us + +- Interested in joining us? Check out our [jobs page](https://bytebase.com/jobs?source=github) for openings. +- Want to solve your schema change and database management headache? Book a [30min demo](https://cal.com/adela-bytebase/30min) with one of our product experts. diff --git a/apps/bytebase/data.yml b/apps/bytebase/data.yml new file mode 100644 index 00000000..5d4ef1ad --- /dev/null +++ b/apps/bytebase/data.yml @@ -0,0 +1,20 @@ +name: Bytebase +tags: + - DevOps +title: 开源的数据库 DevOps 工具 +type: DevOps +description: 开源的数据库 DevOps 工具 +additionalProperties: + key: bytebase + name: Bytebase + tags: + - DevOps + shortDescZh: 开源的数据库 DevOps 工具 + shortDescEn: An open-source database DevOps tool + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://www.bytebase.com + github: https://github.com/bytebase/bytebase + document: https://www.bytebase.com/docs \ No newline at end of file diff --git a/apps/bytebase/logo.png b/apps/bytebase/logo.png new file mode 100644 index 00000000..cf27d622 Binary files /dev/null and b/apps/bytebase/logo.png differ