update apphub:AppStore add initial apps

This commit is contained in:
zhaojing1987 2024-03-12 16:43:26 +08:00
parent c38e177a4c
commit d4094da3a5
3 changed files with 21 additions and 8 deletions

View file

@ -1,26 +1,29 @@
[nginx_proxy_manager] [nginx_proxy_manager]
base_url = http://websoft9-proxy:81/api base_url = http://websoft9-proxy:81/api
user_name = admin@mydomain.com user_name = help@websoft9.com
user_pwd = gtBi82ljgJLOBdIv user_pwd = JB21x6AkBshLRK5Y
nike_name = admin nike_name = admin
[gitea] [gitea]
base_url = http://websoft9-git:3000/api/v1 base_url = http://websoft9-git:3000/api/v1
user_name = websoft9 user_name = websoft9
user_email = admin@mydomain.com user_email = admin@mydomain.com
user_pwd = lDaCDO8gASjB user_pwd = HZ4RYXr9ce6R
[portainer] [portainer]
base_url = http://websoft9-deployment:9000/api base_url = http://websoft9-deployment:9000/api
user_name = admin user_name = admin
user_pwd = p$(kww3otq8aTMnN user_pwd = BDMnVb)gqRKISzfH
[api_key] [api_key]
key = 8b13560946c48e6f545a9adcf33c3441f798c59a81b3f241bdfeb179cfbc0ff8 key = 8b13560946c48e6f545a9adcf33c3441f798c59a81b3f241bdfeb179cfbc0ff8
[domain] [domain]
wildcard_domain = wildcard_domain =
[cockpit] [cockpit]
port = 9000 port = 9000
[initial_apps]
keys = gitlab

View file

@ -2,4 +2,7 @@
path = /websoft9/library/apps path = /websoft9/library/apps
[app_media] [app_media]
path = /websoft9/media/json/ path = /websoft9/media/json/
[apps_default]
keys = wordpress

View file

@ -75,8 +75,15 @@ class AppManger:
settings = {k: v for k, v in env_data.items() if k.startswith("W9_") and k.endswith("_SET")} settings = {k: v for k, v in env_data.items() if k.startswith("W9_") and k.endswith("_SET")}
item["settings"] = settings item["settings"] = settings
item["is_web_app"] = "W9_URL" in env_data item["is_web_app"] = "W9_URL" in env_data
return data # Get the initial_apps from config.ini
initial_apps = ConfigManager("config.ini").get_value("initial_apps", "keys")
if not initial_apps:
return data
else:
app_keys = initial_apps.split(",")
return [item for item in data if item.get("key") in app_keys]
except (CustomException,Exception) as e: except (CustomException,Exception) as e:
logger.error(f"Get available apps error:{e}") logger.error(f"Get available apps error:{e}")
raise CustomException() raise CustomException()