tjarbo / discord-moodle-bot

Get notified about changes on moodle on you favorite platform!
https://docs.tjarbo.me/moodle-notification-service/1.0.0/home
GNU Affero General Public License v3.0
28 stars 3 forks source link

✨ Easy deployment with Heroku #82

Closed tjarbo closed 3 years ago

tjarbo commented 3 years ago

As a User I want to host the fmdb in the cloud and deploy it with "one" click because I am not familiar with docker and my fmdb should run 24/7

Description:

As Heroku is part of the education pack of Github and provides one Hobby Dyno for two years for free, it is perfectly suited. Heroku provides a simple button, what is placed inside the wiki and starts a guided setup to run fmdb on Heroku.

Because at this moment, a keen mongoDB is not part of the Heroku Addons anymore (big sad), the user will have to setup a mongoDB on mongoDB altas (also part of the Github education pack :tada:) aswell. This should be covered in wiki!

🟢 In scope:

🔴 Not in scope:

What should be the result?

There should be a fully article in the wiki, how to setup a fmdb with mongoDB atlas and Heroku!

tjarbo commented 3 years ago

https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Ftjarbo%2Fdiscord-moodle-bot%2Ftree%2Ffeature%2F82-Easy-deployment-with-Heroku

tjarbo commented 3 years ago

Current error message:

-----> Building on the Heroku-20 stack
-----> Node.js app detected
-----> Creating runtime environment
       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true

-----> Installing binaries
       engines.node (package.json):  unspecified
       engines.npm (package.json):   unspecified (use default)

       Resolving node version 12.x...
       Downloading and installing node 12.20.1...
       Using default npm version: 6.14.10

-----> Installing dependencies
       Installing node modules

       > fancy-moodle-discord-bot@1.0.0 postinstall /tmp/build_bae3c1a2_
       > lerna bootstrap

       lerna notice cli v3.20.2
       lerna info Bootstrapping 2 packages
       lerna info Installing external dependencies
       lerna info Symlinking packages and binaries
       lerna success Bootstrapped 2 packages
       added 741 packages in 31.095s

-----> Build
       Running build

       > fancy-moodle-discord-bot@1.0.0 build /tmp/build_bae3c1a2_
       > lerna run build

lerna notice cli v3.20.2
lerna info Executing command in 2 packages: "npm run build"
lerna ERR! npm run build exited 1 in '@fmdb/frontend'
lerna ERR! npm run build stdout:
> @fmdb/frontend@0.1.0 prebuild /tmp/build_bae3c1a2_/packages/frontend
> vue-cli-service lint --fix
lerna ERR! npm run build stderr:
sh: 1: vue-cli-service: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! @fmdb/frontend@0.1.0 prebuild: `vue-cli-service lint --fix`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @fmdb/frontend@0.1.0 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.NdWDg/_logs/2021-01-14T20_18_30_149Z-debug.log
lerna ERR! npm run build exited 1 in '@fmdb/frontend'
lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fancy-moodle-discord-bot@1.0.0 build: `lerna run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fancy-moodle-discord-bot@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.NdWDg/_logs/2021-01-14T20_18_30_225Z-debug.log
-----> Build failed

       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       Some possible problems:

       - Node version not specified in package.json
         https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

       Love,
       Heroku

 !     Push rejected, failed to compile Node.js app.
 !     Push failed
tjarbo commented 3 years ago

Finally it works :tada: