forked from oceanbase/ob-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
130 changed files
with
7,440 additions
and
748 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
- "*_release" | ||
paths: | ||
- '**/*.go' | ||
|
||
|
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ on: | |
pull_request: | ||
branches: | ||
- master | ||
- "*_release" | ||
paths: | ||
- "ui/**/*" | ||
|
||
|
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
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
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,6 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 2.2.0 | ||
appVersion: 2.2.1 | ||
description: A Helm chart for OB-Operator | ||
name: ob-operator | ||
type: application | ||
version: 2.2.0 | ||
version: 2.2.1 |
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
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
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 |
---|---|---|
|
@@ -5,4 +5,4 @@ kind: Kustomization | |
images: | ||
- name: controller | ||
newName: oceanbase/ob-operator | ||
newTag: 2.2.0 | ||
newTag: 2.2.1 |
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
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,24 @@ | ||
FROM node:18-alpine as builder-fe | ||
WORKDIR /workspace | ||
COPY ./ui . | ||
ENV NODE_OPTIONS=--max_old_space_size=5120 | ||
RUN yarn | ||
RUN yarn build | ||
|
||
FROM golang:1.21.5 as builder-be | ||
ARG GOPROXY=https://goproxy.io,direct | ||
ARG GOSUMDB=sum.golang.org | ||
ARG COMMIT_HASH=unknown | ||
WORKDIR /workspace | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -o bin/todo ./main.go | ||
|
||
# start build docker image | ||
FROM alpine:3.17 | ||
WORKDIR /bin | ||
COPY --from=builder-be /workspace/bin/todo /bin/todo | ||
COPY --from=builder-fe /workspace/dist /bin/ui/dist | ||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
USER root | ||
|
||
ENTRYPOINT ["/bin/todo"] |
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,30 @@ | ||
# OceanBase Todo List | ||
|
||
OceanBase Todo List, an extremely simple web application that shows how to use OceanBase as backend database. Initially, it was created for learning about ob-operator referenced in [a real-world example](https://oceanbase.github.io/ob-operator/docs/manual/appendix/example). | ||
|
||
## Features | ||
|
||
- Connect the database and execute the database migration (Create tables) | ||
- Create initial todo list data in the database (Steps for learning about ob-operator) | ||
- Provide RESTful API for frontend app to interact with the database | ||
- Provide a simple frontend app to show the todo list | ||
- Show all todo list | ||
- Add a new todo item | ||
- Update a todo item (title and description) | ||
- Done/Undone a todo item | ||
- Delete a todo item | ||
|
||
## How to use | ||
|
||
```bash | ||
# Build frontend app first | ||
cd ui | ||
yarn # or npm install | ||
yarn build # or npm run build | ||
|
||
# Run backend app | ||
cd .. | ||
go mod tidy | ||
go build -o oceanbase-todo main.go | ||
DB_HOST=xxx DB_PORT=xxx DB_USER=xxx DB_PASSWORD=xxx DB_DATABASE=xxx ./oceanbase-todo | ||
``` |
Oops, something went wrong.