From 72aa81e593f7ec041547212cdf72dc2319a64fc1 Mon Sep 17 00:00:00 2001 From: KaySar12 Date: Fri, 9 May 2025 16:16:37 +0700 Subject: [PATCH] update --- .env | 4 ++ .gitignore | 2 + bifrost.json | 46 ++++++++++------- nextcloud.json | 6 +-- nextdns.json | 3 +- nextfirewall.json | 3 +- nextnas.json | 3 +- nextvpn.json | 6 +-- nextweb.json | 6 +-- nextzenos.json | 5 +- registry.mk | 7 ++- requirement.txt | 2 + scripts/__init__.py | 0 scripts/__pycache__/config.cpython-312.pyc | Bin 0 -> 1024 bytes scripts/__pycache__/gitea.cpython-312.pyc | Bin 0 -> 2350 bytes scripts/gitea/__init__.py | 4 ++ .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 268 bytes scripts/gitea/__pycache__/api.cpython-312.pyc | Bin 0 -> 2333 bytes .../gitea/__pycache__/config.cpython-312.pyc | Bin 0 -> 1030 bytes scripts/gitea/api.py | 26 ++++++++++ scripts/gitea/config.py | 14 ++++++ scripts/main.py | 47 ++++++++++++++++++ 22 files changed, 151 insertions(+), 33 deletions(-) create mode 100644 .env create mode 100644 requirement.txt create mode 100644 scripts/__init__.py create mode 100644 scripts/__pycache__/config.cpython-312.pyc create mode 100644 scripts/__pycache__/gitea.cpython-312.pyc create mode 100644 scripts/gitea/__init__.py create mode 100644 scripts/gitea/__pycache__/__init__.cpython-312.pyc create mode 100644 scripts/gitea/__pycache__/api.cpython-312.pyc create mode 100644 scripts/gitea/__pycache__/config.cpython-312.pyc create mode 100644 scripts/gitea/api.py create mode 100644 scripts/gitea/config.py create mode 100644 scripts/main.py diff --git a/.env b/.env new file mode 100644 index 0000000..d138aac --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +GITEA_ACCESS_TOKEN=528ed6363ba47884c05235cff9ba47e38b4201d5 +GITEA_USERNAME=hoangvv +GITEA_PASSWORD=smartyourlife +GITEA_HOST = https://git.nextzenos.com/api/v1 diff --git a/.gitignore b/.gitignore index adf8f72..10e460e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ # Go workspace file go.work +venv/ +*.zip diff --git a/bifrost.json b/bifrost.json index 43a4c72..7be94e5 100644 --- a/bifrost.json +++ b/bifrost.json @@ -1,4 +1,13 @@ { + "id": "bifrost", + "name": "Bifrost", + "description": "Bifrost is a platform for building and deploying applications.", + "deployment": { + "type": "native" + }, + "installation": { + "host_type": "local" + }, "apps": [ { "key": "nextzenos", @@ -38,45 +47,46 @@ ], "tags": [ { - "key": "Website", - "name": "Website", + "key": "server-panel", + "name": "Server Panel", "sort": 1 }, { - "key": "Database", + "key": "database", "name": "Database", "sort": 2 }, { - "key": "Server", - "name": "Web Server", + "key": "firewall", + "name": "FireWall", "sort": 3 }, { - "key": "Runtime", - "name": "Runtime", + "key": "tool", + "name": "Utility", "sort": 4 }, { - "key": "Tool", - "name": "Utility", + "key": "vpn", + "name": "VPN", "sort": 5 }, { - "key": "DevTool", - "name": "Development tool", - "sort": 10 + "key": "nas", + "name": "NAS", + "sort": 5 }, { - "key": "Middleware", - "name": "Middleware", - "sort": 12 + "key": "cli", + "name": "CLI", + "sort": 6 }, { - "key": "Local", - "name": "Local", - "sort": 99 + "key": "api", + "name": "API", + "sort": 6 } ], + "version": "1.0.0", "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextcloud.json b/nextcloud.json index a8462a7..3f0a42a 100644 --- a/nextcloud.json +++ b/nextcloud.json @@ -6,9 +6,9 @@ "deployment": { "type": "docker" }, - "location": { - "host_type": "local", - "installation_path": "/opt/bifrost/apps/nextcloud" + "installation": { + "host_type": "local" }, + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextdns.json b/nextdns.json index 8132708..8a0796f 100644 --- a/nextdns.json +++ b/nextdns.json @@ -6,9 +6,10 @@ "deployment": { "type": "native" }, - "location": { + "installation": { "host_type": "remote", "host": "10.0.0.1" }, + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextfirewall.json b/nextfirewall.json index 5737429..c36cb1e 100644 --- a/nextfirewall.json +++ b/nextfirewall.json @@ -6,9 +6,10 @@ "deployment": { "type": "native" }, - "location": { + "installation": { "host_type": "remote", "host": "10.0.0.1" }, + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextnas.json b/nextnas.json index 90514d7..b5dc82c 100644 --- a/nextnas.json +++ b/nextnas.json @@ -6,8 +6,9 @@ "deployment": { "type": "native" }, - "location": { + "locinstallationation": { "host_type": "local" }, + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextvpn.json b/nextvpn.json index 9403ae1..31c5a4a 100644 --- a/nextvpn.json +++ b/nextvpn.json @@ -6,9 +6,9 @@ "deployment": { "type": "docker" }, - "location": { - "host_type": "local", - "installation_path": "/opt/bifrost/apps/nextvpn" + "installation": { + "host_type": "local" }, + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextweb.json b/nextweb.json index b905a1b..6924ac3 100644 --- a/nextweb.json +++ b/nextweb.json @@ -6,10 +6,10 @@ "deployment": { "type": "docker" }, - "location": { - "host_type": "local", - "installation_path": "/opt/bifrost/apps/nextweb" + "installation": { + "host_type": "local" }, "apps": [], + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/nextzenos.json b/nextzenos.json index 6f77342..e78426d 100644 --- a/nextzenos.json +++ b/nextzenos.json @@ -1,14 +1,15 @@ { "id": "nextzenos", - "name": "NextZenOS", + "name": "NextzenOS", "version": "1.4", "description": "", "deployment": { "type": "native" }, - "location": { + "installation": { "host_type": "local" }, "apps": [], + "tags": [], "lastModified": 1746671214 } \ No newline at end of file diff --git a/registry.mk b/registry.mk index 88f927b..07eb470 100644 --- a/registry.mk +++ b/registry.mk @@ -1,6 +1,8 @@ REGISTRY_PATH = $(shell pwd)/registry REGISTRY_REPO = git.nextzenos.com/CDN/bifrost-registry.git -update_registry: +RELEASE_UID = 8845 +PYTHON = $(REGISTRY_PATH)/venv/bin/python +update_registry: package_registry upload_registry ( cd $(REGISTRY_PATH) && \ @read -p "Enter your commit message: " commit_msg; \ git pull https://$(GIT_USER):$(GIT_PASS)@$(REGISTRY_REPO) || true; \ @@ -11,3 +13,6 @@ update_registry: package_registry: (cd $(REGISTRY_PATH) && \ zip -r registry.zip *.json -x .gitignore .git .mk) + +upload_registry: + $(PYTHON) $(REGISTRY_PATH)/scripts/main.py diff --git a/requirement.txt b/requirement.txt new file mode 100644 index 0000000..0a7efc4 --- /dev/null +++ b/requirement.txt @@ -0,0 +1,2 @@ +python-dotenv ; python_version > '3.10' +git+https://github.com/dblueai/giteapy.git ; python_version > '3.10' \ No newline at end of file diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/__pycache__/config.cpython-312.pyc b/scripts/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e6309717d8585a679803c04261499e676af698d GIT binary patch literal 1024 zcmah|J8u&~5T3m|JDZ17M1jJ>JghV)p_~*@1SmX`$O#CP6fw;;%gMWT);K=1caCtB zg2F}k1!o2K4dZ@py=iM-1-3m z_^OqJtQd3`6xam{6xG1h(x{;g!!=N3GhNdFX6(n|2n<*TYPNw|`$lARtroIV-?Xw~ zBRN|0JxZt_vifEzPU{IZLXWx=O6&py7g2BxirV0sEyFhD=rRwPx9Hc)yi!WSb&eT- zU97CT5cYl5cm^GmP%`T_kiIt@O1xE^pn;@lKd!h9)nqdRH;`1K{HKob?>g17q|QK6 zb51GL`g`Z<_#iStQAP{w)QTKgeo!pTll!Y{ML7}S`NhS;+8QaYJ}j)r%zQIk_XXeb zLhjdPdVzU@2^-6yie7c2B{R{wn<9$HlzQ7wRKpKsy2A8ZN^9K@LOJ9$IC;uiay$m4 zAy}C|S1)e`tX2;6CNKZK>ImNt9m+PH1zr{^(-Ew~gHW`bpd@%B44kOdv>E~v!s|RF zWNY%w2}~zeea68P#a_T^Zt6HU)5*;o=C1EpM>u<$pL%1zw)Y+#=5Ov;$2i-;*&}@E zboRzOe!xH8D;~~1PVC1x-@*A;cRTpn=i7yW)$U+>&-sLJbyW{_#FieY?rktadz*o((rntEtYRWE)3FKqTevi0W4n~{TwC*PX|tcdl>B>Z_Z@6DTeKZco4;c!2J z_Ugm%!yi6EzF?=-#HP_017n@2L>0;;?|ln-f%koRpO55->RThKe+x2T%loTBTKtOU zToJX^gr?CL2Vn~od>Xev)``{jEi`up!|k@!v=&-5wmpPAAxgVfC7Z%r+V2L7rZKOV+yTDy zjMoW!gB4n^bko=rT#;$zd4>xoerB@NG_9>0@IBYFjCt*mU6ZEiVF>FHJaiBX4&T+5Or~2VtpXZ)6vn!f8KMx_3FcHAOcyWK%Jy*?vE`AC z2ldf$dvtu;+FjjQbw+0#`C3i7)_Yt+_nAijL!<&B|0dGKdjyFjK=?^{{q)7tH_P?- zm>nP6j_k&EVov;$BTv<&sovuu-=U>~p|9}k|iiMixAsM=J#Kyi}!d3nxri! z--ha`Njo+9ZscR;ea1=6I&!Wi<$4c|bd#})b}*8Njxn7~e&4s<+$RAF#Y4kOo=f-R zlVubZHAQjz6=l&>D`m6~DaxZtq3n5R7$*#&AXLhe45O7mIRmokCFBnQ#pj0$z9sA& z$Qt=B3W3S*K_PHiK)ud&8qFLxZwL+UjIZ*BYP1iPzC^B!9%0~ literal 0 HcmV?d00001 diff --git a/scripts/gitea/__pycache__/api.cpython-312.pyc b/scripts/gitea/__pycache__/api.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a647ca04cabe59daf01e2e0b1e18ce4a71066d0 GIT binary patch literal 2333 zcmd6ozi-n(6vyxK(`^X`8UiRl0!m3k5upqfNYDa>1_p`*LP%LGD|UlXVuw2il!639 z2N)0oLl?#_RTNuL zXw&Zx-Tmn!^f8e-y*08-XET0= z7@SDKU450wre^3)$a`I;PJpYWIgY`Tzp`0o7-m*cA7n3SbIjmomZ?RJo2-`Q1*TO@ zo-HDZtX$DfR%(tQNt&*ik~F`&ox{m?R~SO_-5^iN=h%@~%(xTUX-Xcr@ZzkY`-Gnfgi%MD3VHcbM zkm-`9>L$a(#fCsULM#HN6P0nKpM>YJF^N%uY_);#6IjVj>Ld6Fdwz(23ksD+bq0gVg{H8-~8#WQG|G>;`kN1Ez-; zf$}X}QkIxny3-h$utp|U&GkoXkL;0YTfAHsF83do@NKTL{}8Fdkbe{D;oXHqk|6F$ zdHLk|lh+R$iBneM)M|7+z81F==WTJaE==|x5Ag;o%DOi1-Z9&A*<-L`H6v(m{ z&@BWE3ymvSzxZ*G1@b*WgQvfTXz&6>z2fQ=nmO0JN}I0JU6(sK6L4=???%On=EWUF p3m5Md9pRj}=1G=;J}hT^AILX9rSuco`Gq8Yg!WSSC_!~6{swBgx3T~L literal 0 HcmV?d00001 diff --git a/scripts/gitea/__pycache__/config.cpython-312.pyc b/scripts/gitea/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d28e121265562ed4a659f301bea0211af3bfea25 GIT binary patch literal 1030 zcmah|J8u&~5T3m|JDZ17M1jJ>JghX=Q5-K2Mk<9!8IuAf@^jR+mxd#JY?RI->mXlB@Nd(X7cs1 zvhG26?yDy==%AF+S$BY(d&8mBTgNFHNQw@UiaStGH#2Yp$)w7E>KOm7Qy)v~3?wz@ zl|rq*cdm~QB2yG+bimH6%8``^<BQ`V8=2_P-O zs{FZnc`IOzYM?iH_1BCed_Qz3+j16pRj5oyuo@3S(Q$%`;H@xlq7j_9;j|hB6T+K3 zBxHN?k3*PFt@@aQCyKp*v%=I#VWwA@IV#-PwT^NAtT^@Ber4}JIx61UwN7xphx5ny z%GvDAxBQTQxK}=!eVp1)aIuGrFYos7^-s4;1FPM`_P+BG&-GOgb;_0=sOfDoLgWY` zn?7wfG#(@5S=(#G9&tg%z5#Jj2{EaezLkg#D-h^w>q6hKGRr6q(tbN5^ux+*{F?}U z-(pm=C_Aswc}0om