mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-02-02 17:08:38 +08:00
update apphub
This commit is contained in:
parent
00a45147b6
commit
743eb9e5dc
@ -16,7 +16,7 @@ user_name = admin
|
|||||||
user_pwd = j4FYLqfisbv4vkYY
|
user_pwd = j4FYLqfisbv4vkYY
|
||||||
|
|
||||||
[api_key]
|
[api_key]
|
||||||
key = df5b3dbcb00091462769fe0bac0c7008c8788ffa72f86c32f4a2c6af90daa285
|
key = 689899a928b91838e98abd6ac50fc6f6f1fab73e44932a6fd5167e4ce63e72e0
|
||||||
|
|
||||||
[domain]
|
[domain]
|
||||||
wildcard_domain = test.websoft9.cn
|
wildcard_domain = test.websoft9.cn
|
||||||
|
@ -1,25 +1,5 @@
|
|||||||
[mysql]
|
|
||||||
port = 3306
|
|
||||||
user = root
|
|
||||||
|
|
||||||
[postgresql]
|
|
||||||
port = 5432
|
|
||||||
user = postgres
|
|
||||||
|
|
||||||
[mongodb]
|
|
||||||
port = 27017
|
|
||||||
user = root
|
|
||||||
|
|
||||||
[oracle]
|
|
||||||
port = 1521
|
|
||||||
user = system
|
|
||||||
|
|
||||||
[sqlserver]
|
|
||||||
port = 1433
|
|
||||||
user = sa
|
|
||||||
|
|
||||||
[docker_library]
|
[docker_library]
|
||||||
path = /websoft9/library/apps
|
path = /websoft9/library/apps
|
||||||
|
|
||||||
[app_media]
|
[app_media]
|
||||||
path = /websoft9/media/json/
|
path = /websoft9/media/json/
|
@ -7,7 +7,6 @@ class AppResponse(BaseModel):
|
|||||||
app_id: str=Field("", description="App ID",example="wordpress")
|
app_id: str=Field("", description="App ID",example="wordpress")
|
||||||
endpointId: int=Field(-1, description="Endpoint ID(-1:Not install on app store)",example=1)
|
endpointId: int=Field(-1, description="Endpoint ID(-1:Not install on app store)",example=1)
|
||||||
app_name: Optional[str]=Field(None, description="App name",example="wordpress")
|
app_name: Optional[str]=Field(None, description="App name",example="wordpress")
|
||||||
app_port: Optional[int] = Field(None, description="App port", example=80)
|
|
||||||
app_dist: Optional[str]=Field(None, description="App dist",example="community")
|
app_dist: Optional[str]=Field(None, description="App dist",example="community")
|
||||||
app_version: Optional[str]=Field(None, description="App version",example="1.0.0")
|
app_version: Optional[str]=Field(None, description="App version",example="1.0.0")
|
||||||
app_official: bool=Field(True, description="App official",example=True)
|
app_official: bool=Field(True, description="App official",example=True)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import ipaddress
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@ -170,7 +169,9 @@ class AppManger:
|
|||||||
apps_info.append(app_response)
|
apps_info.append(app_response)
|
||||||
|
|
||||||
return apps_info
|
return apps_info
|
||||||
except (CustomException,Exception) as e:
|
except CustomException as e:
|
||||||
|
raise e
|
||||||
|
except Exception as e:
|
||||||
logger.error(f"Get apps error:{e}")
|
logger.error(f"Get apps error:{e}")
|
||||||
raise CustomException()
|
raise CustomException()
|
||||||
|
|
||||||
@ -246,28 +247,34 @@ class AppManger:
|
|||||||
app_env = main_container_info.get("Config", {}).get("Env", [])
|
app_env = main_container_info.get("Config", {}).get("Env", [])
|
||||||
|
|
||||||
# Get info from app_env
|
# Get info from app_env
|
||||||
app_port = None
|
|
||||||
app_name = None
|
app_name = None
|
||||||
app_dist = None
|
app_dist = None
|
||||||
app_version = None
|
app_version = None
|
||||||
|
w9_url = None
|
||||||
|
w9_url_replace = False
|
||||||
for item in app_env:
|
for item in app_env:
|
||||||
key, value = item.split("=", 1)
|
key, value = item.split("=", 1)
|
||||||
app_env_format[key] = value
|
app_env_format[key] = value
|
||||||
if key == "W9_HTTP_PORT_SET" or key == "W9_DB_PORT_SET":
|
if key == "W9_APP_NAME":
|
||||||
app_port = value
|
|
||||||
elif key == "W9_APP_NAME":
|
|
||||||
app_name = value
|
app_name = value
|
||||||
elif key == "W9_DIST":
|
elif key == "W9_DIST":
|
||||||
app_dist = value
|
app_dist = value
|
||||||
elif key == "W9_VERSION":
|
elif key == "W9_VERSION":
|
||||||
app_version = value
|
app_version = value
|
||||||
|
elif key == "W9_URL_REPLACE":
|
||||||
|
w9_url_replace = value
|
||||||
|
elif key == "W9_URL":
|
||||||
|
w9_url = value
|
||||||
|
|
||||||
|
for domain in domain_names:
|
||||||
|
domain["w9_url_replace"] = w9_url_replace
|
||||||
|
domain["w9_url"] = w9_url
|
||||||
|
|
||||||
# Set the appResponse
|
# Set the appResponse
|
||||||
appResponse = AppResponse(
|
appResponse = AppResponse(
|
||||||
app_id = app_id,
|
app_id = app_id,
|
||||||
endpointId = endpointId,
|
endpointId = endpointId,
|
||||||
app_name = app_name,
|
app_name = app_name,
|
||||||
app_port = app_port,
|
|
||||||
app_dist = app_dist,
|
app_dist = app_dist,
|
||||||
app_version = app_version,
|
app_version = app_version,
|
||||||
app_official = True,
|
app_official = True,
|
||||||
@ -286,7 +293,6 @@ class AppManger:
|
|||||||
app_id = app_id,
|
app_id = app_id,
|
||||||
endpointId = endpointId,
|
endpointId = endpointId,
|
||||||
app_name = "",
|
app_name = "",
|
||||||
app_port = 0,
|
|
||||||
app_dist = "",
|
app_dist = "",
|
||||||
app_version = "",
|
app_version = "",
|
||||||
app_official = True,
|
app_official = True,
|
||||||
@ -983,6 +989,19 @@ class AppManger:
|
|||||||
message="Invalid Request",
|
message="Invalid Request",
|
||||||
details=f"Proxy ID:{proxy_id} Not Found"
|
details=f"Proxy ID:{proxy_id} Not Found"
|
||||||
)
|
)
|
||||||
|
# # Get the app_id by proxy_id
|
||||||
|
# app_id = host.get("forward_host",None)
|
||||||
|
# if app_id:
|
||||||
|
# # Get the app_info by app_id
|
||||||
|
# app_info = self.get_app_by_id(app_id)
|
||||||
|
# if app_info:
|
||||||
|
# # Get the w9_url and w9_url_replace
|
||||||
|
# w9_url = app_info.get("w9_url",None)
|
||||||
|
# w9_url_replace = app_info.get("w9_url_replace",None)
|
||||||
|
|
||||||
|
# if w9_url_replace:
|
||||||
|
# domain_names = host.get("domain_names",None)
|
||||||
|
|
||||||
# Remove proxy
|
# Remove proxy
|
||||||
ProxyManager().remove_proxy_host_by_id(proxy_id)
|
ProxyManager().remove_proxy_host_by_id(proxy_id)
|
||||||
logger.access(f"Successfully removed domains:{host['domain_names']} for app: [{host['forward_host']}]")
|
logger.access(f"Successfully removed domains:{host['domain_names']} for app: [{host['forward_host']}]")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## 0.8.30 release on 2023-11-16
|
## 0.8.30-rc1 release on 2023-11-16
|
||||||
1. improve all plugins githubaction
|
1. improve all plugins githubaction
|
||||||
2. install plugin by shell
|
2. install plugin by shell
|
||||||
## 0.8.29 release on 2023-11-04
|
## 0.8.29 release on 2023-11-04
|
||||||
|
@ -16,7 +16,7 @@ services:
|
|||||||
- 9001-9999:8080
|
- 9001-9999:8080
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- /data/mysource:/websoft9/apphub-dev
|
- /data/websoft9/apphub:/websoft9/apphub-dev
|
||||||
- apphub_media:/websoft9/media
|
- apphub_media:/websoft9/media
|
||||||
depends_on:
|
depends_on:
|
||||||
- deployment
|
- deployment
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.8.30",
|
"version": "0.8.30-rc1",
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"portainer": "0.0.8",
|
"portainer": "0.0.8",
|
||||||
"nginx": "0.0.6",
|
"nginx": "0.0.6",
|
||||||
|
Loading…
Reference in New Issue
Block a user