GithubHelp home page GithubHelp logo

karyeet / heroku-lavalink Goto Github PK

View Code? Open in Web Editor NEW
43.0 3.0 140.0 85 KB

Deploy lavalink on heroku.

License: MIT License

Procfile 100.00%
lavalink heroku-lavalink lavaplayer heroku heroku-deployment discord discord-bot lavalink-server autoupdates lts

heroku-lavalink's Introduction

heroku-lavalink

Easily deploy a lavalink server on heroku. This approach is minimal, but reliable. This branch will automatically download the latest Lavalink jar file.

  • heroku-lavalink will now download the latest Lavalink.jar automatically & directly from GitHub

To update your Lavalink.jar, restart all dynos.

  • heroku-lavalink can now visit itself every 20 minutes (instead of uptimerobot)

set APP_NAME in config vars to your heroku application's name to enable, you only need this for the free tier

Your lavalink server will be available over port 80 and 443(HTTPS/SSL) at your heroku app website (APP_NAME.herokuapp.com)

I will not provide support in issues for external libraries.

Config Var Description Default
PASS The password you will use to authenticate http requests. Change this to whatever you want it to be. youshallnotpass
APP_NAME Set this to your heroku application's name. This will allow the project to visit itself and prevent it from sleeping. blank
PRERELEASES Whether to download lavalink prereleases. false
GITHUB_REPO The github repo to fetch releases from. freyacodes/Lavalink
JAVA_TOOL_OPTIONS This sets the ram to max. Don't edit this variable unless you know what you're doing. -Xmx400m -Xms400m -XX:MaxPermSize=48m

One Click Deploy:

Deploy <-- Click me!

Buildpacks should be added automatically, you may modify the PASS variable during setup to change the password.

Github Deploy:

  1. Create a fork of this repo
  2. Navigate to your heroku project @dashboard.heroku.com
  3. Navigate to your project "Settings", click "Reaveal Config Vars", and create a new var called PASS and set it to what you want your lavalink password to be.
  4. In the same menu, create a new var called JAVA_TOOL_OPTIONS and set it to -Xmx400m -Xms400m -XX:MaxPermSize=48m. You may also set other config vars here.
  5. In the same menu, create a var called APP_NAME and set it to your heroku applications name.
  6. Navigate to the "Deploy" tab
  7. Find/Click the "Connect to GitHub" section and login if needed
  8. For the repo name, type "heroku-lavalink" and Click "Search"
  9. Click "Connect"
  10. Scroll down and find "Manual Deploy", then switch the branch to auto and "Deploy Branch".

Heroku CLI Deploy:

  1. Download files (Clone or download->Download ZIP).
  2. Extract files into an empty directory.
  3. Follow https://devcenter.heroku.com/articles/git. If heroku is unable to automatically configure buildpacks, go to your projects settings on the heroku website and add java and nodejs.
  4. Go to your project settings->config vars on heroku and set a new var called PASS to what you want your lavalink password to be.
  5. In the same menu, create a new var called JAVA_TOOL_OPTIONS and set it to -Xmx400m -Xms400m -XX:MaxPermSize=48m. You may also set other config vars here.
  6. In the same menu, create a var called APP_NAME and set it to your heroku applications name.

Notes:

  1. After changing PASS you must redeploy or click the More menu and restart all dynos.
  2. If heroku is unable to automatically configure buildpacks, go to your projects settings on the heroku website and add java and nodejs.

Please understand your lavalink server will likely run out of memory on a free dyno. I would recommend upgrading or switching to a lighter alternative. If you do upgrade, you must change -Xmx in the JAVA_TOOL_OPTIONS to your new amount of ram.

heroku-lavalink's People

Contributors

dependabot[bot] avatar karyeet avatar wizzygeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

heroku-lavalink's Issues

Error on One Click Heroku deploy

Since this evening, I've been getting the following error in Heroku logs:

`2021-04-09T21:10:40.492566+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.

2021-04-09T21:10:40.656931+00:00 app[web.1]: Fetching latest Lavalink.jar url...

2021-04-09T21:10:41.220446+00:00 app[web.1]: Error occured when fetching latest release url: TypeError: Cannot read property 'browser_download_url' of undefined

2021-04-09T21:10:41.323897+00:00 heroku[web.1]: Process exited with status 0`

port?

what do i enter the port of the lavalink as?

read ECONNRESET

Unfortunately, i can't use the server. There are no errors during bootstrap but when I tried connecting my lava manager (I use erela.js btw), it shows this error:

Node "disgusting-bot.herokuapp.com" encountered an error: read ECONNRESET.

is there any way to fix this?

Getting error

2021-04-03T16:39:48.302058+00:00 heroku[web.1]: Starting process with command node bootstrap.js 2021-04-03T16:39:51.830074+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them. 2021-04-03T16:39:51.830446+00:00 app[web.1]: bash: node: command not found 2021-04-03T16:39:51.901243+00:00 heroku[web.1]: Process exited with status 127 2021-04-03T16:39:51.977460+00:00 heroku[web.1]: State changed from starting to crashed

Lavalink server shutting down when left idle for 15 minutes

Whenever the server is left idle for more than 15 minutes, it shuts down and gives this error
2021-05-11T18:18:43.747853+00:00 app[web.1]: 2021-05-11 18:18:43.747 INFO 32 --- [ XNIO-1 I/O-2] lavalink.server.io.SocketContext : Shutting down 0 playing players.

Lavaplayer crash

The app crashes after launching, any ways how to solve? thanks

2022-07-20T13:50:44.375359+00:00 heroku[web.1]: Starting process with command `node bootstrap.js`
2022-07-20T13:50:45.182646+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-07-20T13:50:45.182755+00:00 app[web.1]: bash: node: command not found
2022-07-20T13:50:45.309685+00:00 heroku[web.1]: Process exited with status 127
2022-07-20T13:50:45.414553+00:00 heroku[web.1]: State changed from starting to crashed
2022-07-20T13:50:45.418776+00:00 heroku[web.1]: State changed from crashed to starting
2022-07-20T13:50:48.180615+00:00 heroku[web.1]: Starting process with command `node bootstrap.js`
2022-07-20T13:50:49.024712+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-07-20T13:50:49.024809+00:00 app[web.1]: bash: node: command not found
2022-07-20T13:50:49.145987+00:00 heroku[web.1]: Process exited with status 127
2022-07-20T13:50:49.289466+00:00 heroku[web.1]: State changed from starting to crashed

Error R14, Memory Exceeded by 117%

Running it for an estimated 24 hours now, and Heroku fired an error, apparently I've exceeded the maximum RAM limit

Deployment Method:

  • "DEPLOY TO HEROKU"
  • Yeah that's about it

Expected behavior
For it to just, work

Screenshots
image

Logs
2022-04-08T11:13:08.348076+00:00 heroku[web.1]: Process running mem=610M(117.6%)
2022-04-08T11:13:08.350397+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2022-04-08T11:13:29.837862+00:00 heroku[web.1]: Process running mem=610M(117.6%)
2022-04-08T11:13:29.840113+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2022-04-08T11:13:50.042425+00:00 heroku[web.1]: Process running mem=610M(117.6%)
2022-04-08T11:13:50.140000+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)

How to connect lavalink server with discord.py bot

Describe the bug
This ain't a bug, but a question. I'm trying to upload my discord.py bot to heroku, and i use lavalink for playing music. And for connecting to the server, I need "host", "port" and "rest_uri".
When having the bot and server running in my PC, I would go host = 127.0.0.1, port = 2333, rest_uri=http://127.0.0.1:2333
But I have no idea on how to do it with the server on heroku.

Deployment Method
The deployment method used:

  1. One Click Deploy

Lavalink don't start

2021-02-07T13:11:22.652226+00:00 heroku[bootscrap.1]: Starting process with command ./Src/Bootscrap.js
2021-02-07T13:11:23.313079+00:00 heroku[bootscrap.1]: State changed from starting to up
2021-02-07T13:11:24.594900+00:00 heroku[bootscrap.1]: Process exited with status 126
2021-02-07T13:11:24.670345+00:00 heroku[bootscrap.1]: State changed from up to crashed
2021-02-07T13:11:24.528480+00:00 app[bootscrap.1]: bash: ./Src/Bootscrap.js: Permission denied

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.