Go to file
viletyy da19306d4b 修复:日志关联不存在 2024-08-16 14:45:52 +08:00
.devops refactor: .devops/未命名项目.yml 2024-05-16 14:54:47 +08:00
doc init 2024-04-10 14:32:49 +08:00
extras/obfastapi init 2024-04-10 14:32:49 +08:00
logs Add logs/sync.log 2024-04-10 14:43:09 +08:00
script init 2024-04-10 14:32:49 +08:00
sql 同步日志记录方式调整 2024-04-29 11:02:07 +08:00
src 修复:日志关联不存在 2024-08-16 14:45:52 +08:00
sync init 2024-04-10 14:32:49 +08:00
web init 2024-04-10 14:32:49 +08:00
.gitignore Update .gitignore 2024-04-10 14:38:55 +08:00
API.md clone时取消指定分支 & 添加强制同步 2024-05-10 15:09:50 +08:00
Dockerfile init 2024-04-10 14:32:49 +08:00
Documentation.md Update Documentation.md 2024-04-10 17:40:44 +08:00
LICENSE init 2024-04-10 14:32:49 +08:00
Makefile init 2024-04-10 14:32:49 +08:00
README-CN.md init 2024-04-10 14:32:49 +08:00
README.md Update README.md 2024-05-16 14:54:47 +08:00
boot init 2024-04-10 14:32:49 +08:00
env.ini.example init 2024-04-10 14:32:49 +08:00
main.py 移除静态资源挂载 2024-06-12 09:04:10 +08:00
requirement.txt init 2024-04-10 14:32:49 +08:00
sync.py init 2024-04-10 14:32:49 +08:00

README.md

ob-repository-synchronize

Description

ob-repository-synchronize is a small tool which can help engineer to master their open source production's code synchronization between GitHub, Gitee, CodeChina, internal repository and so on.

add text...test...ok

Principle

Base on git rebase

Base on git diff

backend

requirement

name version necessity
python 3.9 True
uvicorn 0.14.0 True
SQLAlchemy 1.4.21 True
fastapi 0.66.0 True
aiohttp 3.7.4 True
pydantic 1.8.2 True
starlette 0.14.2 True
aiomysql 0.0.21 True
requests 2.25.1 True
loguru 0.6.0 True
typing-extensions 4.1.1 True
aiofiles 0.8.0 True

how to install

[!NOTE] Run the code in python 3.9

pip3 install -r requirement.txt

python3 main.py

run the sync script locally

python3 sync.py

frontend

Refer the web readme

docker

docker pull XXX:latest

docker run -p 8000:8000 -d XXX bash start.sh -s backend

How to use it

  1. Config your database
  • Run the table.sql script in sql folder
  • Config the database connection string in src/base/config.py
  1. Config your repo address, branch, (todo token) by website
  1. DIY yourself sync script (Refer the two example in sync folder) and run the sync script under a cronjob you should consider:
  • http address or ssh address (how to add your ssh key)
  • rebase logic or diff logic
  • which cronjob (maybe the k8s cronjob or linux system crontab)