diff --git a/app/Module/Apps/Apps.php b/app/Module/Apps/Apps.php
index 8d81953c2..964a7e70d 100644
--- a/app/Module/Apps/Apps.php
+++ b/app/Module/Apps/Apps.php
@@ -24,6 +24,7 @@ class Apps
'ai',
'face',
'search',
+ 'appstore',
];
/**
@@ -583,8 +584,15 @@ class Apps
$savePath = dirname($filePath) . '/.docker-compose.local.yml';
try {
+ // 读取文件内容
+ $fileContent = file_get_contents($filePath);
+
+ // 处理特殊环境变量
+ $fileContent = str_replace('${HOST_PWD}', '', $fileContent);
+ $fileContent = str_replace('${PUBLIC_PATH}', '${HOST_PWD}/public', $fileContent);
+
// 解析YAML文件
- $content = Yaml::parseFile($filePath);
+ $content = Yaml::parse($fileContent);
// 确保services部分存在
if (!isset($content['services'])) {
@@ -797,7 +805,7 @@ class Apps
*/
private static function curl($path): array
{
- $url = "http://host.docker.internal:" . env("APPS_PORT") . "/{$path}";
+ $url = "http://nginx/appstore/api/{$path}";
$extra = [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . env('APP_KEY'),
diff --git a/docker-compose.yml b/docker-compose.yml
index 14cb20a32..2e7070d01 100755
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -218,16 +218,15 @@ services:
ipv4_address: "${APP_IPPR}.15"
restart: unless-stopped
- apps:
- container_name: "dootask-apps-${APP_ID}"
+ appstore:
+ container_name: "dootask-appstore-${APP_ID}"
privileged: true
- build:
- context: ../dooso
- dockerfile: Dockerfile-cli
+ image: "kuaifan/dootask-appstore:0.0.1"
volumes:
- ./:/var/www
- /var/run/docker.sock:/var/run/docker.sock
environment:
+ DOO_ENV: "/var/www"
HOST_PWD: "${PWD}"
network_mode: host
restart: unless-stopped
diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue
index 3e5826410..96b07ddeb 100644
--- a/resources/assets/js/pages/manage.vue
+++ b/resources/assets/js/pages/manage.vue
@@ -349,14 +349,6 @@
-
-
-
-
-
@@ -383,7 +375,6 @@ import MicroApps from "../components/MicroApps";
import UserSelect from "../components/UserSelect.vue";
import ImgUpload from "../components/ImgUpload.vue";
import ApproveDetails from "./manage/approve/details.vue";
-import AppStore from "./manage/appstore/store.vue";
import notificationKoro from "notification-koro1";
import emitter from "../store/events";
import SearchBox from "../components/SearchBox.vue";
@@ -392,7 +383,6 @@ export default {
components: {
SearchBox,
ApproveDetails,
- AppStore,
ImgUpload,
UserSelect,
TaskExport,
@@ -467,8 +457,6 @@ export default {
approveDetails: {id: 0},
approveDetailsShow: false,
-
- appStoreShow: false,
}
},
@@ -1217,7 +1205,7 @@ export default {
this.settingRoute(act)
break;
case 'appstore':
- this.appStoreShow = true
+ emitter.emit('openMicroApp', {name: 'appstore', url: $A.mainUrl('appstore/web/'), disableScopecss: true});
break;
}
},
diff --git a/resources/assets/js/pages/manage/appstore/store.vue b/resources/assets/js/pages/manage/appstore/store.vue
deleted file mode 100644
index 66611b833..000000000
--- a/resources/assets/js/pages/manage/appstore/store.vue
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
- App Store
-
-
-
-
-