Code Monkey home page Code Monkey logo

devcordbot's Introduction

DevcordBot

setup dev environment

  • copy .env.example to .env
  • enter at minimum DISCORD_TOKEN and GUILD_ID (and all you want to test)
  • start the dev database > docker-compose -f docker-compose.develop.yml up -d
  • enter the database information
    • DATABASE_HOST="localhost"
    • DATABASE="postgres"
    • DATABASE_USERNAME="postgres"
    • DATABASE_PASSWORD="DevcordRoxx2021"
  • enable pg_trgm for the database
    • enter docker exec -it test-db bash to access the docker image's bash shell
    • switch the user to postgres with su postgres
    • enter psql to access the postgres database and run CREATE EXTENSION pg_trgm; to install the required postgres extension pg_trgm
    • exit the image's bash shell
  • the bot is now ready to start

setup productive environment

  • copy .env.example to .env
  • enter all properties
  • run docker-compose up -d

setup redeploy command

We recommend this library for the redeployment of the bot. Simply set up the webhook for executing docker-compose pull && docker-compose up -d in the directory where you have the docker-compose.yml and .env file. Then enter the webhook URL at REDEPLOY_HOST and the Token at REDEPLOY_TOKEN. Example Config:

{
    "id": "redeploy-devcordbot",
    "execute-command": "/path/to/devcordbot/redeploy.sh",
    "command-working-directory": "/path/to/devcordbot",
    "trigger-rule":
    {
      "match":
      {
        "type": "value",
        "value": "YOUR_SECRET_TOKEN",
        "parameter":
        {
          "source": "header",
          "name": "Redeploy-Token"
        }
      }
    }
  }

redeploy.sh:

#!/bin/sh
docker-compose pull && docker-compose up -d

devcordbot's People

Contributors

dlsf avatar drschlaubi avatar jkoenig134 avatar johnnyjayjay avatar niggelgame avatar nycodeghg avatar t1il avatar taucher2003 avatar

Watchers

 avatar

Forkers

dlsf

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.