Code Monkey home page Code Monkey logo

cecibot's Introduction

cecibot

Installation Instructions

  1. Install Node.js and PM2:

    # Install Node.js
    curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    sudo apt-get install -y nodejs build-essential
    
    # Install PM2
    sudo npm install pm2@latest -g
    
  2. Configure PM2:

    # Ensure that PM2 will be restarted on reboot
    pm2 startup
    
    # Link PM2 to [Keymetrics]
    pm2 link <KEYMETRICS_SECRET> <KEYMETRICS_PUBLIC>
    
  3. Install redis-stat:

    sudo apt-get install -y ruby-all-dev
    sudo gem install redis-stat
    
  4. Install fonts for Chinese characters:

    sudo apt-get install -y fonts-wqy-zenhei ttf-wqy-microhei
    
  5. Ensure that the following directories exist (if not, make them):

    ~/.cecibot/backend
    ~/.cecibot/email
    ~/.cecibot/telegram
    
  6. Use StevenBlack's hosts to block adware & malware:

    sudo wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -O /etc/hosts
    sudo ifdown --exclude=lo -a && sudo ifup --exclude=lo -a
    
    • You should update your hosts file regularly (preferably every week, or at least once a month), using the same commands.
  7. Install the latest version of Python 3:

    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install -y python3.6 python3.6-dev
    
  8. Install pip:

    wget https://bootstrap.pypa.io/get-pip.py -O - | python3.6 - --user
    
  9. Install redis using chris-leas PPA:

    sudo add-apt-repository ppa:chris-lea/redis-server
    sudo apt-get update
    sudo apt-get install -y redis-server
    

The Backend

  1. Install all the dependencies of the backend:

    # Dependencies of Chromium
    sudo apt-get install libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1\
      libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2\
      libpangocairo-1.0-0 libatk1.0-0 libatk-bridge2.0-0 libgtk-3-0
    
    python3.6 -m pip install --user pyppeteer redis requests
    

Frontends

E-Mail

  1. Install all the dependencies of the E-Mail frontend:

    python3.6 -m pip install --user flask redis boto3
    
  2. Save your AWS credentials at ~/.aws/credentials:

    [default]
    aws_access_key_id=YOUR_ACCESS_KEY
    aws_secret_access_key=YOUR_SECRET_KEY
    
  3. Set the default AWS region at ~/.aws/config:

    [default]
    region=eu-west-1
    

Telegram

  1. Install all the dependencies of the Telegram frontend:

    python3.6 -m pip install --user python-telegram-bot redis
    

The Web

  1. Install nginx:

    sudo apt install nginx
    
  2. Install Certbot for Let's Encrypt and follow all of the instructions on their website to get an HTTPS certificate for both cecibot.com and www.cecibot.com with HTTP -> HTTPS redirection enabled for both:

    https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx

Running

  1. redis-stat

    redis-stat --server=63790 --daemon
    

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.