Skip to content

S-Masakatsu/Slack-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Bot App

■ Docker container environment

  • ~/docker/golang
    • Dockerfile_dep => production(dep)
    • Dockerfile_dev => development(dev)

Change the value of the environment variable DOCKER_APP_ENV in the ~/.env file.

■ App development environment

build:
  context: .
  dockerfile: Dockerfile_dev

App(Golang) development is directly under ~/app.
Go into the container and execute the go run command.

$ docker exec -it slackbot-app /bin/ash

/app # go run main.go

■ Read Token

  • Bot User OAuth Access Token

    # cat $BOT_USER_OAUTH_ACCESS_TOKEN_PATH
  • Verification Token

    # cat $VERIFICATION_TOKEN_PATH
  • Workspace Token

    # cat $WORKSPACE_TOKEN_PATH

■ ngrok

  1. Connect your account

    $ cd ngrok
    $ ./ngrok authtoken <Token>
  2. Start Docker container for production

    Make Docker a production environment

    DOCKER_APP_ENV=dep
    $ docker-compose up --build
  3. Fire it up

    $ ./ngrok http -host-header="0.0.0.0:3000" 3000

Releases

No releases published

Packages

No packages published

Languages