0

在 Windows 10 上本地创建的 Meteor 应用程序使用Meteor Up部署到 Ubuntu VPS。该应用程序正在运行并可从浏览器185.148.129.235访问。

服务器代码读取位于“/var/www/html/Audio”中的目录中的文件名,Apache 将其内容提供给客户端浏览器,但请注意以下错误。

这里还有 mup.js 文件,任何帮助都非常有用,以便能够修复此错误并读取所述位置中的文件名。

module.exports = {
  servers: {
    one: {
      host: '185.148.129.235',
      username: 'root',
      password: '.....',
      opts: {
        port: 7822
      }      
    }
  },

  app: {
    name: 'audio',
    path: '../',
    servers: {
      one: {},
    },

    buildOptions: {
      serverOnly: true,
    },

    env: {
      ROOT_URL: 'http://185.148.129.235.static.a2webhosting.com',
      MONGO_URL: 'mongodb://mongodb/meteor',
      MONGO_OPLOG_URL: 'mongodb://mongodb/local',
    },

    docker: {
      image: 'abernix/meteord:node-12-base',
    },
    enableUploadProgressBar: true
  },

  mongo: {
    version: '3.4.1',
    servers: {
      one: {}
    }
  },
};

PS C:\PATH-TO-APP\.deploy> mup logs -f --tail=50
[185.148.129.235]=> Starting meteor app on port:3000
[185.148.129.235]Error: ENOENT: no such file or directory, scandir '/var/www/html/Audio'
[185.148.129.235]    at Object.readdirSync (fs.js:955:3)
[185.148.129.235]    at objTitlesBuild (server/main.js:22:15)
[185.148.129.235]    at server/main.js:9:3
[185.148.129.235]    at Function.time (/built_app/programs/server/profile.js:273:30)
[185.148.129.235]    at /built_app/programs/server/boot.js:415:15
[185.148.129.235]    at /built_app/programs/server/boot.js:465:7
[185.148.129.235]    at Function.run (/built_app/programs/server/profile.js:280:14)
[185.148.129.235]    at /built_app/programs/server/boot.js:463:13 {
[185.148.129.235]  errno: -2,
[185.148.129.235]  syscall: 'scandir',
[185.148.129.235]  code: 'ENOENT',
[185.148.129.235]  path: '/var/www/html/Audio'
[185.148.129.235]}

4

1 回答 1

0

在阅读Docker 卷之后,mup.js 的以下补充解决了这个问题

    volumes: {
      '/var/www/html/Audio/':'/Audio',
    },

于 2021-02-26T17:06:02.513 回答