Git Product home page Git Product logo

nadekobot's Introduction

Easy way to deploy on heroku with one click

Deploy to Heroku(click the button)

NB! This will deploy with using heroku's postgresql, if you need mssql use the manual method, if you need to use your custom postgresql its enough to just change the postgresql URI in the enviroments(Settings->Config Vars).

Don't read abobe

Below guide is a manual deployment method

Explanation

Before you continue, notice that this nadeko uses Microsoft SQL Server or PostgreSQL. If you are going to use MSSQL then you need to have your own SQL Server since heroku doesn't provide any. And for PostgreSQL you can install free/paid plugin in heroku. Why it uses remote database instead of the built-in SQLite? The answer is because of heroku's ephemeral filesystem.

Tools That You Need

  1. GIT
  2. The Heroku CLI

Creating New App In Heroku

  1. Log(or make account) in heroku dashboard

  2. Click on the "New" button in right cornet and select "create new app" Image of Creating App

  3. Enter unique app name and select region and click "Create app".

  4. Select "Overview" tab and click on "Configure Add-ons".

  5. In the search bar enter "Heroku Redis" and select plan(free) and install the plugin.

  6. Same again but now enter "LogDNA".

  7. If you are going to use PostgreSQL, then install the "Heroku Postgres" too. If MSSQL then skip this step.

  8. Click on the "Heroku Redis" plugin and after you will be redirected on redis dashboard click "View Credentials..." you will see host, port, user and password. Write them down somewhere, we will need them later.

  9. Go back to the main heroku dashboard(click on the app if you are on apps list) go to the "Settings" and add those buildpacks:

    • https://github.com/challengee/heroku-buildpack-libsodium
    • https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
    • https://github.com/dubsmash/heroku-buildpack-opus.git
    • https://github.com/appositum/heroku-buildpack-youtube-dl.git
    • https://github.com/ScarletKuro/dotnetcore-buildpackv2.1.git

    NB! Watch out for extra spaces when copy-pasting.

Setting Up The Database

You have two options here: MSSQL or PostgreSQL.

MSSQL option:

  • In credentials.json use following type and connectionstring:
    "Type": "sqlserver",
    "ConnectionString": "Data Source={address to database};Initial Catalog={database name};User ID={username};Password={password}"

PostgreSQL option:

  • For using PostgreSQL you need to have "Heroku Postgres" plugin installed on your dyno. Remember that if you are using free plan you have only 10000 rows available.
  • In credentials.json use following type and connectionstring:
    "Type": "pgsql",
    "ConnectionString": "Host={address to database};Port={port};Database={database name};Username={username};Password={password};SSL Mode=Require;Trust Server Certificate=true;Maximum Pool Size=20;Keepalive=60"

Only edit the parameters in {} brackets, don't touch the rest if you don't know what you are doing.

NB! If you are using a domain name to connect to database take a note that some domain names may require a www prefix and some doesn't to connect to the database. For example my college SQL Server needs a www before the domain name and the gearhost's doesn't as well as heroku postgresql.

To connect to your database I recommend to use Database.NET it's a light tool and supports connection for both MSSQL and PostgreSQL databases.

Setting Up The Nadeko

  1. On my github go to to the release and download the heroku-nadeko-1.9-release.zip(not the Source code or anything else)

    Image of Realse

  2. Extract the zip archive in a folder

  3. Edit the credentials.json the explanation is located here. But we will need to edit the RedisOptions as well. {Host}:{Port}, name={User}, password={Password} replace them with credentials from Heroku Redis Dasboard(remove the {} brackets). Image of RedisOptions And the ConnectionString and Type for Database as well, look at the "Setting Up The Database" section.

  4. Save

Deploying To Heroku

Open Your PC terminal and type those commands:

  1. cd <directory to the nadekobot where you extracted the archieve>
  2. heroku login and enter your heroku credentials
  3. git init
  4. heroku git:remote -a <heroku app name>
  5. git add .
  6. git commit -am "init"
  7. git push heroku master

After the installation is done go to he application dashboard and click "Configure Dynos" click the edit button and toggle the dyno then "Config" button.

Image of Dyno Toggle

Now you can go to the LogDNA and view logs of your nadeko and look what it's doing

FIN.

Video How To Setup

ScreenShot

nadekobot's People

Contributors

anheledir avatar appelemac avatar arahaan avatar blitz4694 avatar deivedux avatar delicious-flatbread avatar dogeops97 avatar esmeray6 avatar fearnlj01 avatar kaoticz avatar khorha avatar lordveovis avatar maybegoogle avatar ndk-dscrd avatar nitix avatar poag avatar potato1680 avatar rjt-rockx avatar rob5251 avatar samdivaio avatar scarletkuro avatar shikhir-arora avatar simonnguyen avatar taknok avatar tg44 avatar theoddball avatar tukimoop avatar wicke-07 avatar willysunny avatar zergling-man avatar

Watchers

 avatar

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.