Skip to content

Commit ab8667f

Browse files
committed
hotfix rc6
1 parent 7853a61 commit ab8667f

30 files changed

+405
-12010
lines changed

apphub/src/api/v1/routers/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async def app_redeploy(
192192
endpointId: int = Query(None, description="Endpoint ID to redeploy app on. If not set, redeploy on the local endpoint"),
193193
pullImage: bool = Query(..., description="Whether to pull the image when redeploying the app"),
194194
):
195-
195+
196196
async def log_generator(queue: asyncio.Queue):
197197
error_occurred = False
198198
try:

apphub/src/api/v1/routers/proxy.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from src.schemas.errorResponse import ErrorResponse
77
from src.schemas.proxyHosts import ProxyHost
88
from src.services.app_manager import AppManger
9-
from src.services.proxy_manager import ProxyManager
10-
from src.core.logger import logger
119

1210
router = APIRouter()
1311

@@ -27,19 +25,6 @@ def get_proxys(
2725
):
2826
return AppManger().get_proxys_by_app(app_id,endpointId)
2927

30-
@router.get(
31-
"/proxys/ssl/certificates",
32-
summary="Get SSL Certificates",
33-
description="Get all ssl certificates",
34-
responses={
35-
200: {"model": list[dict]},
36-
400: {"model": ErrorResponse},
37-
500: {"model": ErrorResponse},
38-
}
39-
)
40-
def get_certificates():
41-
return ProxyManager().get_all_certificates()
42-
4328
@router.post(
4429
"/proxys/{app_id}",
4530
summary="Create Proxy",
@@ -55,7 +40,6 @@ def create_proxys(
5540
app_id: str = Path(..., description="App ID to create proxys from"),
5641
endpointId: int = Query(None, description="Endpoint ID to create proxys from. If not set, create proxys from the local endpoint"),
5742
):
58-
5943
return AppManger().create_proxy_by_app(app_id,domain_names.domain_names,endpointId)
6044

6145
@router.put(
@@ -110,6 +94,4 @@ def delete_proxys_by_id(
11094
):
11195
client_host = request.headers.get("Host")
11296
# client_host = request.client.host
113-
AppManger().remove_proxy_by_id(proxy_id,client_host)
114-
115-
97+
AppManger().remove_proxy_by_id(proxy_id,client_host)

apphub/src/config/config.ini

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ base_url = http://websoft9-proxy:81/api
33
user_name = admin@mydomain.com
44
user_pwd = hJUGWrlDgqmGglr0
55
nike_name = admin
6-
listen_port = 9000
7-
docker0_ip = 172.17.0.1
8-
ssl_cert = /data/custom_ssl/websoft9-self-signed.cert
9-
ssl_key = /data/custom_ssl/websoft9-self-signed.key
6+
listen_port = 8888
107

118
[gitea]
129
base_url = http://websoft9-git:3000/api/v1
@@ -20,16 +17,16 @@ user_name = admin
2017
user_pwd = R@9)qn)t9hJW
2118

2219
[api_key]
23-
key = 9e66918137d882c6ebdc1eccb0866e25172c5f8fa2101458a8ce9b044e4c7e5e
20+
key = 61a9d013db3231c4a3ba45353437930815d524392a0db6502824476cc18d2130
2421

2522
[docker_mirror]
2623
url = https://artifact.websoft9.com/release/websoft9/mirrors.json
2724

2825
[domain]
29-
wildcard_domain =
26+
wildcard_domain =
3027

3128
[cockpit]
32-
port = 9090
29+
port = 9000
3330

3431
[initial_apps]
3532
keys =

apphub/src/config/system.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ keys = wordpress,zentao,passbolt,moodle,mautic,espocrm,ttrss,discuz,mixpost,next
2020

2121
[webhook]
2222
wechat = https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9393241f-05b6-45a2-a3e7-b3ab5275cf09
23-
monitor_api = https://monitor.service.websoft9.com
23+
monitor_api = https://monitor-gnfarrpanp.cn-zhangjiakou-vpc.fcapp.run
24+

apphub/src/external/nginx_proxy_manager_api.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,3 @@ def delete_proxy_host(self, proxy_id: int):
142142
Response: Response from Nginx Proxy Manager API
143143
"""
144144
return self.api.delete(path=f"nginx/proxy-hosts/{proxy_id}")
145-
146-
def get_certificates(self):
147-
"""
148-
get all certificates
149-
150-
Returns:
151-
Response: Response from Nginx Proxy Manager API
152-
"""
153-
return self.api.get(
154-
path="nginx/certificates", params={"expand": "owner,proxy_hosts,dead_hosts,redirection_hosts"}
155-
)

apphub/src/schemas/appSettings.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ class NginxProxyManagerSetting(BaseModel):
44
base_url: HttpUrl = Field(..., title="The base url for nginx proxy manager")
55
user_name: str = Field(..., title="The user name for nginx proxy manager")
66
user_pwd: str = Field(..., title="The user password for nginx proxy manager")
7-
listen_port: int = Field(..., title="The listen port for nginx proxy manager")
8-
docker0_ip: str = Field(..., title="The docker0 IP for nginx proxy manager")
9-
ssl_cert: str = Field(..., title="The SSL certificate path for nginx proxy manager")
10-
ssl_key: str = Field(..., title="The SSL key path for nginx proxy manager")
117

128
class GiteaSetting(BaseModel):
139
base_url: HttpUrl = Field(..., title="The base url for gitea")

apphub/src/services/app_manager.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,17 +680,14 @@ async def send_log(message: str):
680680
# Chenck the apps number
681681
check_apps_number(endpointId)
682682

683-
#fix bug(上面排除了状态为Inactive的,导致状态为Inactive的不能重建,这里重新加入)
684-
app_official = [app for app in appInstallApps if app.app_official == True and (app.status == 1 or app.status == 2)]
685-
686683
portainerManager = PortainerManager()
687684

688685
# Check the endpointId is exists.
689686
if endpointId:
690687
check_endpointId(endpointId, portainerManager)
691688
else:
692689
endpointId = portainerManager.get_local_endpoint_id()
693-
690+
694691
# validate the app_id is exists in portainer
695692
await send_log("Verify Application Status")
696693
is_stack_exists = portainerManager.check_stack_exists(app_id,endpointId)
@@ -702,7 +699,6 @@ async def send_log(message: str):
702699
)
703700
# Get stack_id
704701
stack_id = portainerManager.get_stack_by_name(app_id,endpointId).get("Id",None)
705-
706702
if stack_id is None:
707703
raise CustomException(
708704
status_code=400,

apphub/src/services/proxy_manager.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ def _handler_nginx_error(self,response):
9494
Args:
9595
response (Response): Response
9696
"""
97-
logger.access(f"Nginx error handler called with status: {response.status_code}")
98-
logger.access(f"Nginx error response text: {response.text}")
9997
# If status_code is 500, raise CustomException
10098
if response.status_code == 500:
10199
logger.error(f"Nginx Proxy Manager API Error:{response.status_code}:{response.text}")
@@ -105,7 +103,6 @@ def _handler_nginx_error(self,response):
105103
response_dict = json.loads(response.text)
106104
error_dict = response_dict.get('error', {})
107105
details = error_dict.get('message','Unknown Error')
108-
logger.access(f"Extracted error details: {details}")
109106
raise CustomException(
110107
status_code=400,
111108
message=f"Invalid Request",
@@ -336,16 +333,4 @@ def get_proxy_host_by_id(self,proxy_id:int):
336333
except Exception as e:
337334
logger.error(f"Get proxy host by id:{proxy_id} error:{e}")
338335
raise CustomException()
339-
340-
def get_all_certificates(self):
341-
"""
342-
Get all certificates
343-
344-
Returns:
345-
list[dict]: Certificates
346-
"""
347-
response = self.nginx.get_certificates()
348-
if response.status_code == 200:
349-
return response.json()
350-
else:
351-
self._handler_nginx_error(response)
336+

changelog_latest.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
### enhancement:
22

3-
- Add ssl for Websoft9 Console at Settings #640
4-
- 80,443 is a non-essential port during websoft9 installation. #639
5-
- Requirements changes about adding console_port #638
6-
- Enable HTTPS access for Websoft9 console #637
3+
- 【Websoft9 优化】-- 服务状态监控 #626
4+
- 【Websoft9 优化】-- PHP 版本管理 #627
5+
- 【Websoft9 优化】-- 系统指标 #628
6+
- 【Websoft9 优化】-- 网关集成 WAF 能力 #629
7+
- 【Websoft9 优化】-- 备份与恢复 #630
78

89

910

cockpit/cockpit.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@
33
[WebService]
44
AllowUnencrypted = true
55
LoginTitle= Websoft9 - Linux AppStore
6-
ProtocolHeader = X-Forwarded-Proto
7-
Origins = http://172.17.0.1:9000 ws://172.17.0.1:9000

0 commit comments

Comments
 (0)