Giter Site home page Giter Site logo

thibaultjanbeyer / standup-bot Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 12.65 MB

Akira, Open source standup bot for slack

Home Page: https://standup-bot.com/

License: MIT License

JavaScript 4.43% TypeScript 90.78% CSS 2.25% PLpgSQL 1.68% Shell 0.87%
slack slack-bot standup standup-meetings

standup-bot's Introduction

Akira Standup Bot

All you need to know on: https://www.standup-bot.com

Info

Testing Slack integration on dev

  • Create local-tunnels
  • Add them respectively to .env and to your bots settings

Building locally

(make sure .env and .env.production are ready)

  • Run ./build.sh
  • Run ./start.sh

Server resources

apt update
apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget -qO- https://get.docker.com/ | sh
apt install nginx

ufw allow ssh &&
ufw allow 3000 &&
ufw allow 80 &&
ufw allow from 172.0.0.1 &&
ufw enable &&
ufw allow 'Nginx Full' &&
ufw status

mkdir -p /var/www/standup-bot.com/html
chown -R $USER:$USER /var/www/standup-bot.com/html
chmod -R 755 /var/www/standup-bot.com

nano /etc/nginx/sites-available/standup-bot.com
server {
  listen 80;
  listen [::]:80;
  server_name standup-bot.com www.standup-bot.com;
  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
  }
  location /_bot {
    rewrite ^/_bot(.*) /$1 break;
    proxy_pass http://127.0.0.1:3001;
  }
}

Note that location /_bot { is optional in case you want to run the bot on the same domain under a sub-path /_bot, if you prefer a sub-domain bot. then you’ll need to add a new site instead:

nano /etc/nginx/sites-available/bot.standup-bot.com
server {
  listen 80;
  listen [::]:80;
  server_name bot.standup-bot.com;
  location / {
    proxy_pass http://127.0.0.1:3001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
  }
}
ln -s /etc/nginx/sites-available/standup-bot.com /etc/nginx/sites-enabled/
ln -s /etc/nginx/sites-available/bot.standup-bot.com /etc/nginx/sites-enabled/

nano /etc/nginx/nginx.conf
http {
    ...
    server_names_hash_bucket_size 64;
    ...
}
systemctl restart nginx
nginx -s reload
systemctl restart nginx

Cloudflare configs

I used cloudflare to get https. I added following DNS records:

A     bot             SERVER.IP.ADDRESS Proxied   Auto
A     standup-bot.com SERVER.IP.ADDRESS Proxied   Auto
CNAME www             standup-bot.com   Proxied   Auto

Continuous Deployment

Happens automatically and continuously via github workflows. Basically:

  • Create .env file with github envs
  • Build docker image & push to private repository (important that is is private because it holds the secrets in env file)
  • SSH into machine
  • Stop old container, run new container (@TODO: update to have zero downtime) It uses the build.sh and start.sh scripts

Bot Settings

Set the URI of your app under Settings > Event Subscriptions > Request URL & under Settings > Interactivity & Shortcuts > Interactivity to:

  • https://bot.standup-bot.com/slack/events.

Add the redirect URLs under Settings > OAuth & Permissions > Redirect URLs, adding:

  • https://www.standup-bot.com
  • https://standup-bot.com
  • https://bot.standup-bot.com

Add the scopes under Settings > OAuth & Permissions > Scopes to the same scopes as in the app.ts

Wallaby.js

Wallaby.js

This repository contributors are welcome to use Wallaby.js OSS License to get test results immediately as you type, and see the results in your editor right next to your code.

standup-bot's People

Contributors

colmdoyle avatar marks avatar mwbrooks avatar slackmon avatar srajiang avatar thibaultjanbeyer avatar turbobot-temp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

standup-bot's Issues

Gif support

Currently people are not able to use gifs in their answers. Would be cool if the bot could capture and use gifs

Does not support images

currently does not support image replies. This would be good for sharing designs or something. Unfortunately this seems a limit in slack, I wrote customer support…

People from other channels got selected

Yasin reported:

Hi thibo. with the akira app (very nice btw) its connected to the [#standup] (https://arabesqueai.slack.com/archives/C05NTKA19GD) channel. However, its still picking up people connected to the #frontend channel (e.g. gabriel) in the standup channels responses. I looked at the configuration (screenshot) and it seems its still linked to frontend maybe. Is there anything on ure side u can do to remove the frontend association? (edited)

Seems like when switching channel in the front-end, it did not clear the old list and just added the new selections on top of the old one.

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.