Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Discord Bot Setup

    Discuss
    5
    10
    461
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JLX89 last edited by

      Hello All!
      I'm looking at trying to setup the Bastion Discord Bot. So from the looks of it, it can be run on Docker. Am I correct in assuming that the easiest way to get this up and running would to package it up as a Cloudron App using the Example provided by Cloudron?

      This would be my first adventure trying to package something up to use.

      Thanks!

      murgero subven 2 Replies Last reply Reply Quote 0
      • murgero
        murgero App Dev @JLX89 last edited by

        @jlx89 Since the bot runs on Node you might be able to just spin up a LAMP stack app (which includes nodejs) and use the run.sh feature (RE: https://docs.cloudron.io/apps/lamp/#custom-startup-script) so you may not need to take the time to learn and then package a full app for this.

        That said if you still would like to package an app for this for whatever reason I am more than happy to help!

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~
        Matrix: @murgero:urgero.org

        J 1 Reply Last reply Reply Quote 2
        • J
          JLX89 @murgero last edited by

          @murgero I will give that a shot, thank you so much!

          M 1 Reply Last reply Reply Quote 1
          • M
            MisterJD @JLX89 last edited by

            @JLX89 sorry for bringing up an older thread. But I stumbled across this and am looking for something exactly like this. Did you get any further with it, did it work with LAMP Stack?

            J 1 Reply Last reply Reply Quote 1
            • subven
              subven @JLX89 last edited by

              @murgero wow I never thaught about that. We might be able to install other brigdes like mautrix-telegram as well inside the LAMP stack.

              murgero 1 Reply Last reply Reply Quote 1
              • J
                JLX89 @MisterJD last edited by

                @MisterJD No, it’s been a while and IIRC it was working and the bot would show as “online” for around 30 seconds and it would crash. I suspect it could be done with some tweaks.

                1 Reply Last reply Reply Quote 0
                • murgero
                  murgero App Dev @subven last edited by

                  @subven Not sure if the LAMP app still supports it but I suspect it does. NodeJS, python, and PHP I believe LAMP can handle to at least some degree.

                  More advanced NodeJS apps will not work though - a basic bot like OP wanted would however so long as you run it with some time of supervisor like node-forever.

                  --
                  https://urgero.org
                  ~ Professional Nerd. Freelance Programmer. ~
                  Matrix: @murgero:urgero.org

                  murgero 1 Reply Last reply Reply Quote 0
                  • murgero
                    murgero App Dev @murgero last edited by

                    @murgero I forgot to mention - using the run.sh custom startup script cannot hang onto the cli session in the cloudron app. You MUST start the app with & at the end:

                    /usr/bin/node /app/data/nodeapp.js & for example to run it in the background and allow run.sh to close so start.sh can run!

                    --
                    https://urgero.org
                    ~ Professional Nerd. Freelance Programmer. ~
                    Matrix: @murgero:urgero.org

                    1 Reply Last reply Reply Quote 1
                    • girish
                      girish Staff last edited by

                      Since 7.2, you can also run a "service" using the cron section - https://docs.cloudron.io/apps/#cron .

                      So:

                      @service /usr/bin/node /app/data/nodeapp.js
                      
                      murgero 1 Reply Last reply Reply Quote 2
                      • murgero
                        murgero App Dev @girish last edited by

                        @girish This is likely gonna be MUCH cleaner, thanks for letting us know!

                        --
                        https://urgero.org
                        ~ Professional Nerd. Freelance Programmer. ~
                        Matrix: @murgero:urgero.org

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Powered by NodeBB