Giter Site home page Giter Site logo

tock-docker's Introduction

Gitter Build Status Docker Pulls

Docker images for Tock

Run images

Several docker files are available in the Docker Hub.

This project contains the source to build and deploy the docker files, and also provides docker-compose files for the whole Tock stack.

Windows users

  • Windows users, you need to run dos2unix to format the mongo setup script first:
dos2unix ./scripts/setup.sh

Run the NLP stack: docker-compose.yml

    #get the last docker-compose file
    curl -o docker-compose.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose.yml
    #get the script to start mongo in replicaset mode
    mkdir -p scripts && curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh && chmod +x scripts/setup.sh
    #get the last tag
    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env
    #launch the stack
    docker-compose up

And go to http://localhost to use the admin interface.

The default login/password is [email protected]/password.

Connect to the mongo database from an IDE

In order to reach the mongo database from a client (if you run the bot in Intellij Idea for example), you need to add in your /etc/hosts (C:\windows\system32\drivers\etc\hosts for windows) these lines:

127.0.0.1 mongo
127.0.0.1 mongo2
127.0.0.1 mongo3

Run the Bot API stack: docker-compose-bot.yml

    #get the last docker-compose-bot file
    curl -o docker-compose.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose-bot.yml
    #get the script to start mongo in replicaset mode
    mkdir -p scripts && curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh && chmod +x scripts/setup.sh
    #get the last tag
    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env
    #launch the stack
    docker-compose -f docker-compose-bot.yml up

Run the Open Data Bot example: docker-compose-bot-open-data.yml

This docker-compose file starts the NLP stack with the Open Data Bot.

You will need a (free) SNCF Open Data key and

    #get the file
    curl -o bot-open-data-variables.env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/bot-open-data-variables.env

Then edit the values:

    #Sncf open data api user
    tock_bot_open_data_sncf_api_user=
  • Also to test the bot with Messenger or Google Assistant, a secure ssl tunnel (for example ngrok) is required:
    ngrok http 8080
  • Then run the bot
    #get the last docker compose file
    curl -o docker-compose-bot-open-data.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose-bot-open-data.yml
    #get the script to start mongo in replicaset mode
    mkdir -p scripts && curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh && chmod +x scripts/setup.sh
    #get the last tag
    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env
    #launch the stack
    docker-compose -f docker-compose-bot-open-data.yml up
  • Take the ngrok value (ie https://xxxx.ngrok.io ) and use it
    • In the webhook interface of Messenger settings, to specify :
    • In the Google Assistant project file

Now you can start to talk to the bot!

Build images

You will need Maven and Git.

    git clone https://github.com/theopenconversationkit/tock-docker.git
    cd tock-docker
    mvn package docker:build

tock-docker's People

Contributors

vsct-jburet avatar

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.