Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.06 KB

README.md

File metadata and controls

46 lines (36 loc) · 1.06 KB

Adapto Bot

  • Development

    1. Run up ngrok at port 5487:
    ~/Adapto-Bot$ ./ngrok http -host-header="localhost" 5487
    1. set up .env:
    MICROSOFT_APP_ID={{YOUR_BOT_ID}}
    MICROSOFT_APP_PASSWORD={{YOUR_BOT_PASSWORD}}
    # HOST should be root path given by ngrok without suffix /api/messages
    HOST=https://090e6077b645.ngrok.io
    1. Run
    ~/Adapto-Bot$ npm i
    ~/Adapto-Bot$ npm run dev
    
    1. After run up, your bot is listening at https://090e6077b645.ngrok.io/api/messages
  • Deployment

    1. Run
    ~/Adapto-Bot$ npm run build
    
    1. Prepare docker image (Dockerfile is at root path) and push built image. You may create an executable shell script:
    HOST="{{DOCKER REGISTRY HOST}}"
    IMG_TAG="adapto-v4-bot:latest"
    USER="{{DOCKER REGISTRY USERNAME}}"
    PASS="{{DOCKER REGISTRY PASSWORD}}"
    
    npm run build
    
    docker build -t $IMG_TAG .
    docker login $HOST -u $USER -p $PASS
    docker tag $IMG_TAG $HOST/$USER/$IMG_TAG
    docker push $HOST/$USER/$IMG_TAG