GithubHelp home page GithubHelp logo

slack-app's Introduction

CodeQL Snyk Tests

slack-app

quick start

pre-work

  • create the ENV_VARS file containing the SLACK_BOT_TOKEN and SLACK_APP_TOKEN
    SLACK_BOT_TOKEN=xoxb-<REPLACEME>
    SLACK_APP_TOKEN=xapp-<REPLACEME>
    
  • install the requirements and activate the virtual environment, see the pre-work section in docs/development.md for more details

run slack-app

  • export the environment variables
    source ~/.secrets/ENV_VARS
  • run app.py
    export PYTHONPATH=.; export SLACK_BOT_TOKEN; export SLACK_APP_TOKEN; python slackapp/app.py

run slack-app with docker

  • pull the image locally
    docker pull ghcr.io/markgreene74/slack-app:latest
  • start the container
    docker run \
        --env-file ~/.secrets/ENV_VARS \
        --rm \
        slack-app

github

codespaces

A devcontainer.json file has been added for custom Codespaces which include pre-commit hooks. See the GitHub documentation about creating a codespace to work on slack-app.

actions

Multiple GitHub Actions (workflow) are configured to ensure automated testing, linting and security scans (Snyk).

Actions:

on push on PR schedule run manually
CodeQL main main Y N
Build and publish main N N Y
Run tests and lint main, feature/** main N Y
Release main main N N
Snyk main main N N

development

See: docs/development.md

deploy slack-app

See: docs/running-slack-app.md

miscellanea

See: docs/miscellanea.md

reference

slack-app's People

Contributors

markgreene74 avatar dependabot[bot] avatar danielalazzara avatar snyk-bot avatar

Watchers

 avatar

slack-app's Issues

Implement GH actions

Implement actions/workflow:

  • run pytest (on push)
  • run linters (on push)
  • release/create an image (manual promotion)

[FEATURE] Improve the deployment of slack-app

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

No response

Suggested Feature

The application slack-app at present time is running on a droplet as a manually started process.

(slack-app-venv) ***:~/github/slack-app$ export SLACK_BOT_DEBUG=true && \
  export SLACK_BOT_TOKEN; export SLACK_APP_TOKEN; python app.py
2023/05/27 13:44:04 DEBUG:SLK_BOT_TOKEN[-4:]='****', SLK_APP_TOKEN[-4:]='***' [bot.config]
2023/05/27 13:44:04 INFO:Config completed (DEBUG_MODE=True) [bot.config]
2023/05/27 13:44:04 DEBUG:Bolt started [bot.slack]

...

It would be nice to have a simple way of deploying the application that:

  • pull the image from ghcr.io/markgreene74/slack-app
  • run the application in a container
  • restart the application if needed
  • (optional) automatically pull a new image and restart the application
  • (optional) saves the logs in /var/log -> moved to a separate issue (#18 )

Environment

- OS:Debian 11 (bullseye)
- Python version: 3.10.11

Anything else?

No response

Bump up Python version

slack-app is currently running on Python 3.10

bump up to a more recent version of Python (e.g., 3.12)

[FEATURE] Save application logs to a file

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

No response

Suggested Feature

Save the logs to a dedicated file in /var/log

  • Optional
  • Configuration driven
  • Log rotation

Environment

- OS:Debian 11 (bullseye)
- Python version: 3.10.11

Anything else?

No response

[FEATURE] Get the configuration from a TOML file

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

All of the configuration at this time is done via config.py with a mix of values/settings gathered from env variables and from within the same config.py file.

Suggested Feature

The configuration could be consolidated in a TOML file.

Environment

- OS: Debian 11 (bullseye)
- Python version: 3.10.11

Anything else?

No response

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.