Go to file
jkcl 8f4441cbd9 Update 未命名项目.yml 2025-07-17 09:54:13 +08:00
.devops Update 未命名项目.yml 2025-07-17 09:54:13 +08:00
doc init 2024-04-10 14:32:49 +08:00
extras/obfastapi 2025-07-15 08:24:52 +08:00
issue_sync issue 2025-07-17 09:27:41 +08:00
logs Add logs/sync.log 2024-04-10 14:43:09 +08:00
script 2025-07-15 08:24:52 +08:00
sql 2025-07-15 08:24:52 +08:00
src issue 2025-07-17 09:27:41 +08:00
sync 2025-07-15 08:24:52 +08:00
venv 2025-07-15 08:24:52 +08:00
web issue 2025-07-17 09:27:41 +08:00
.gitignore 2025-07-15 08:24:52 +08:00
.gitlab-ci.yml 2025-07-15 08:24:52 +08:00
API.md 2025-07-15 08:24:52 +08:00
DEPLOYMENT.md 2025-07-15 08:24:52 +08:00
Dockerfile issue 2025-07-17 09:27:41 +08:00
Documentation.md 2025-07-15 08:24:52 +08:00
LICENSE 2025-07-15 08:24:52 +08:00
Makefile 2025-07-15 08:24:52 +08:00
PLUGIN_README.md issue 2025-07-17 09:27:41 +08:00
PLUGIN_SOLUTION_REPORT.md issue 2025-07-17 09:27:41 +08:00
README-CN.md 2025-07-15 08:24:52 +08:00
README.md 2025-07-15 08:24:52 +08:00
README_SYNC.md 2025-07-15 08:24:52 +08:00
boot 2025-07-15 08:24:52 +08:00
deploy-db.sh 2025-07-15 08:24:52 +08:00
deploy.sh 2025-07-15 08:24:52 +08:00
docker-compose.db.yml 2025-07-15 08:24:52 +08:00
docker-compose.yml 2025-07-15 08:24:52 +08:00
env.db 2025-07-15 08:24:52 +08:00
env.ini issue 2025-07-17 09:27:41 +08:00
env.ini.example 2025-07-15 08:24:52 +08:00
env.production 2025-07-15 08:24:52 +08:00
issue_sync.py 2025-07-15 08:24:52 +08:00
main.py issue 2025-07-17 09:27:41 +08:00
mysql.cnf 2025-07-15 08:24:52 +08:00
requirement.txt 2025-07-15 08:24:52 +08:00
sync.py 2025-07-15 08:24:52 +08:00
test_plugin_system.py issue 2025-07-17 09:27:41 +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.

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)