Skip to content

Remove all docker #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .dockerignore

This file was deleted.

16 changes: 0 additions & 16 deletions Dockerfile

This file was deleted.

4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [v1.6.0](https://github.com/reactivepixel/Max-Bot/releases/tag/v1.6.0)

Max has been moved from a VPS on Digital Ocean running on Docker and a Docker Maria DB Container onto Heroku using a JawsMariaDB resource. Additional enhancements have been made to the fs.armada.bot@gmail.com gmail account to enable 2-factor Auth and a bypass key for Max has been generated.

## [v1.2.2](https://github.com/reactivepixel/Max-Bot/releases/tag/v1.2.2)

Initial feedback from Crewmates prompted some quality of life features to be released early.
Expand Down
14 changes: 0 additions & 14 deletions db/first_run.sh

This file was deleted.

9 changes: 0 additions & 9 deletions db/test_data.js

This file was deleted.

26 changes: 0 additions & 26 deletions docker-compose.yml

This file was deleted.

34 changes: 0 additions & 34 deletions gulpfile.js

This file was deleted.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"npm": "6.9.0"
},
"scripts": {
"start": "node bot/client.js",
"test": "mocha"
"start": "node bot/client.js"
},
"keywords": [],
"author": "Chapman - Chapman@Apextion.com",
Expand All @@ -18,7 +17,7 @@
"discord.js": "^11.5.1",
"mysql2": "^1.6.5",
"nodemailer": "^6.3.1",
"sequelize": "^5.15.2",
"sequelize": "^5.21.2",
"uuid": "^3.3.3"
}
}
67 changes: 16 additions & 51 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Interested in learning how to use Max? See the [Usage documentation here](usage.

### Prerequisites
* [Git](https://git-scm.com/downloads)
* [Docker (Stable)](https://docs.docker.com/docker-for-mac/install/)
* [Node JS](https://github.com/nvm-sh/nvm#installation-and-update)
* [MariaDB](https://mariadb.com/kb/en/library/installing-mariadb-on-macos-using-homebrew/)

### Clone the Codebase.

Expand All @@ -20,38 +21,33 @@ git clone git@github.com:reactivepixel/Max-Bot.git

Create an ```.env``` file with the following sensitive information. Replace the "xxx"'s with some unique information for your local Environment.

> ```!verify``` will not work unless you additionally configure *your own* Gmail account to work with this bot. The Official Max email info will not be distributed.

```
NODE_ENV=development
DEBUG_MODE=3

DISCORD_BOT_TOKEN=xxx_bot_token_from_next_step_xxx

MYSQL_ROOT_PASSWORD=xxx
MYSQL_USER=xxx
MYSQL_PASS=xxx
MYSQL_DATABASE=max
MYSQL_HOST=mysql
DB_PORT_HOST=3306
DB_PORT_GUEST=3306

DISCORD_BOT_TOKEN=xxx_bot_token_from_next_step_xxx

BOT_PORT_HOST=80
BOT_PORT_GUEST=3000
MYSQL_HOST=localhost

EMAIL_USERNAME=xxx
EMAIL_PASS=xxx
GOOGLE_APP_PASSWORD=xxx
```

> Update ```DISCORD_BOT_TOKEN``` with the token you receive from the next step.




### Bot Token

Add a new App and create a Bot User then obtain the [Discord App Bot Token](https://discordapp.com/developers/applications/me) from the created Bot User or contact a Release Manager for Max's Dev Bot token.



Update the ```DISCORD_BOT_TOKEN``` in the .env file with the token provided to you.

Run ``$ gulp pm2`` to create a max.config.js file within your root directory.
Expand All @@ -61,37 +57,27 @@ Run ``$ gulp pm2`` to create a max.config.js file within your root directory.
As an authorized user of the bot you will need to add it to a server.

1. Go to the Discord developer pages (login if you haven't).
1. Go to the application with the bot you want to add to your channel.
1. Copy the Client/Application ID.
1. Go to https://discordapp.com/oauth2/authorize?client_id=```CLIENT_ID_GOES_HERE```&scope=bot&permissions=0
1. Select server and click authorize.
2. Go to the application with the bot you want to add to your channel.
3. Copy the Client/Application ID.
4. Go to https://discordapp.com/oauth2/authorize?client_id=```CLIENT_ID_GOES_HERE```&scope=bot&permissions=0
5. Select server and click authorize.

> [Source](https://stackoverflow.com/questions/37689289/joining-a-server-with-the-discord-python-api)

### Configure Email Functionality
### Optional Configure Email Functionality
Max uses [Nodemailer](https://nodemailer.com/about/) to send verification emails to users joining the Armada server. to work proper locally please follow these steps to create a new gmail account to locally test with:

1. Create a new gmail.com account
2. Once logged in with this account enable [less secure application access](https://myaccount.google.com/u/1/lesssecureapps?pageId=none&pli=1).
3. fill in the ```EMAIL_USERNAME``` & ```EMAIL_PASS``` values on the ```.env``` file with this new gmail account's info.


# Running the Bot

## Local

To run the bot locally ensure that you have followed the installation instructions above and have docker running.

Use docker-compose to start the container with the bot client.
# Running the Bot Locally

```
docker-compose up
npm install
npm start
```

If all went well, and your **DEBUG_MODE** is set properly you will see a logged message of ```Bot Online and Ready!:```

Hop onto your discord server and find a room with the bot and run the command ```!help``` to see a display of optional commands.

# Style Guide

The AirBnB javascript style guide has been put in place and will be enforced through active and passive linting.
Expand Down Expand Up @@ -146,24 +132,3 @@ of this particular output should be. Reference the **Debug Level Chart**
2. General Debug Information for Development
3. Very Detailed and in-depth Output.
4. Highly Fine Grained Detailed and in-depth Output.


# Modules & integrations

## Database
### How to connect using Sequel Pro

You can find more information about the config file `db/config/config.json`

![](https://preview.ibb.co/d07YOG/Screen_Shot_2017_11_10_at_2_49_46_PM.png)


# Container Information

## Node Container

[Official Node](https://hub.docker.com/_/node/) Container used.

# Other Information

## [Change Log](changelog.md)
Loading