MeteorUp log error: no such file or directory

287 Views Asked by At

A Meteor app created locally on a Windows 10, uses Meteor Up to deploy to a Ubuntu VPS. The app is running and accessable from the browser 185.148.129.235.

The server code reads the names of the files in a directory located in '/var/www/html/Audio' where an Apache serves its content to client browser, but please note the error below.

Also here is the mup.js file, Any help is much appricated to be able fix this error and read the names of the files in said locatioin.

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]}

1

There are 1 best solutions below

0
Fred J. On BEST ANSWER

Aftre reading up on Docker volumes, the following addition to the mup.js fixed the problem

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