{"id":20547282,"url":"https://github.com/theopenconversationkit/tock-docker","last_synced_at":"2025-04-14T10:33:23.415Z","repository":{"id":37413125,"uuid":"88103127","full_name":"theopenconversationkit/tock-docker","owner":"theopenconversationkit","description":"Docker and Docker-Compose implementation for Tock.","archived":false,"fork":false,"pushed_at":"2025-04-07T10:29:27.000Z","size":873,"stargazers_count":22,"open_issues_count":3,"forks_count":31,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-07T11:31:04.230Z","etag":null,"topics":["bot","docker","docker-compose","tock"],"latest_commit_sha":null,"homepage":"https://doc.tock.ai","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theopenconversationkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-12T22:48:04.000Z","updated_at":"2025-04-07T10:29:31.000Z","dependencies_parsed_at":"2024-02-13T07:22:51.189Z","dependency_job_id":"cbb490bf-eeae-4775-b677-1a34bddfc71a","html_url":"https://github.com/theopenconversationkit/tock-docker","commit_stats":null,"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenconversationkit%2Ftock-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenconversationkit%2Ftock-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenconversationkit%2Ftock-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenconversationkit%2Ftock-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theopenconversationkit","download_url":"https://codeload.github.com/theopenconversationkit/tock-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248862919,"owners_count":21173903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","docker","docker-compose","tock"],"created_at":"2024-11-16T02:07:15.671Z","updated_at":"2025-04-14T10:33:23.394Z","avatar_url":"https://github.com/theopenconversationkit.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitter](https://badges.gitter.im/tockchat/Lobby.svg)](https://gitter.im/tockchat/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=body_badge)\n[![Build Status](https://app.travis-ci.com/theopenconversationkit/tock-docker.png)](https://app.travis-ci.com/theopenconversationkit/tock-docker)\n[![Docker Pulls](https://img.shields.io/docker/pulls/tock/nlp_api.svg)](https://hub.docker.com/u/tock/)\n\n# Docker images for [Tock](https://github.com/theopenconversationkit/tock)\n\n## Run images\n\nSeveral docker files are available in the [Docker Hub](https://hub.docker.com/r/tock/).\n\nThis project contains the source to build and deploy the docker files, and also provides docker-compose files for the whole Tock stack.\n\n\n### Windows users\n\n- Windows users, you need to run dos2unix to format the mongo setup script first:\n\n```sh\ndos2unix ./scripts/setup.sh\n```\n\n### Prerequisite\n\nInstall mongosh: [https://mongodb.com/docs/mongodb-shell/](https://mongodb.com/docs/mongodb-shell/)\n\n### Run the NLP stack: docker-compose.yml\n\n```sh \n    #get the last docker-compose file\n    curl -o docker-compose.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose.yml\n    #get the script to start mongo in replicaset mode\n    mkdir -p scripts \u0026\u0026 curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh \u0026\u0026 chmod +x scripts/setup.sh\n    #get the last tag\n    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env\n    #launch the stack\n    docker-compose up\n``` \n\nAnd go to [http://localhost](http://localhost) to use the admin interface.\n\nThe default login/password is admin@app.com/password.\n\n### Connect to the mongo database from an IDE\n\nIn order to reach the mongo database from a client \n(if you run the bot in Intellij Idea for example), you need to add in your /etc/hosts\n (C:\\windows\\system32\\drivers\\etc\\hosts for windows) these lines:\n \n```sh\n127.0.0.1 mongo\n127.0.0.1 mongo2\n127.0.0.1 mongo3\n``` \n\n### Run the Bot API stack: docker-compose-bot.yml\n\n```sh \n    #get the last docker-compose-bot file\n    curl -o docker-compose-bot.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose-bot.yml\n    #get the script to start mongo in replicaset mode\n    mkdir -p scripts \u0026\u0026 curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh \u0026\u0026 chmod +x scripts/setup.sh\n    #get the last tag\n    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env\n    #launch the stack\n    docker-compose -f docker-compose-bot.yml up\n``` \n### Run the Open Data Bot example: docker-compose-bot-open-data.yml\n\nThis docker-compose file starts the NLP stack with the [Open Data Bot](https://github.com/theopenconversationkit/tock-bot-open-data).\n\n \n\n* Edit the file [bot-open-data-variables.env](https://github.com/theopenconversationkit/tock-docker/blob/master/bot-open-data-variables.env) and set the required env variables.\n \nYou will need a (free) [SNCF Open Data key](https://data.sncf.com/) and\n \n   * optionally a Messenger application with \"messages\" and \"messaging_postbacks\" webhook events activated - look at the [Facebook documentation](https://developers.facebook.com/docs/messenger-platform/guides/quick-start) \n   and [Tock Messenger Configuration](https://github.com/theopenconversationkit/tock/tree/master/bot/connector-messenger) instructions. \n\n   * optionally a Google Assistant project (see https://developers.google.com/actions/sdk/create-a-project ) - sample project file here: [google_actions_fr.json](https://raw.githubusercontent.com/theopenconversationkit/tock-bot-open-data/master/src/main/resources/google_actions_fr.json)\n   Look at [Tock Google Assistant configuration](https://github.com/theopenconversationkit/tock/tree/master/bot/connector-ga).\n \n\n```sh \n    #get the file\n    curl -o bot-open-data-variables.env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/bot-open-data-variables.env\n``` \n\nThen edit the values:\n\n\n```sh \n    #Sncf open data api user\n    tock_bot_open_data_sncf_api_user=\n``` \n\n* Also to test the bot with Messenger or Google Assistant, a secure ssl tunnel (for example [ngrok](https://ngrok.com/)) is required:\n\n```sh \n    ngrok http 8080\n``` \n\n* Then run the bot\n\n```sh \n    #get the last docker compose file\n    curl -o docker-compose-bot-open-data.yml https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/docker-compose-bot-open-data.yml\n    #get the script to start mongo in replicaset mode\n    mkdir -p scripts \u0026\u0026 curl -o scripts/setup.sh https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/scripts/setup.sh \u0026\u0026 chmod +x scripts/setup.sh\n    #get the last tag\n    curl -o .env https://raw.githubusercontent.com/theopenconversationkit/tock-docker/master/.env\n    #launch the stack\n    docker-compose -f docker-compose-bot-open-data.yml up\n``` \n\n* Take the ngrok value (ie  https://xxxx.ngrok.io ) and use it \n   * In the webhook interface of Messenger settings, to specify :\n        * the url : https://xxxx.ngrok.io/messenger\n        * the verify token you set in tock_bot_open_data_webhook_verify_token env var\n   * In the Google Assistant project file      \n\nNow you can start to talk to the bot!\n\n## Build images\n\nYou will need [Maven](https://maven.apache.org/) and [Git](https://git-scm.com/).\n\n```sh \n    git clone https://github.com/theopenconversationkit/tock-docker.git\n    cd tock-docker\n    mvn package docker:build\n```    \n\n### Build images under corporate proxy\n\nThe docker build is based on buildx so build occurs on a buildx builder node, this node run as a docker container that unfortunatly doesn't inherit proxy environment variables.\n\nTo set your corporate proxy environment variable and use your coporate proxy during docker build stage you will need to define a custom docker buildx builder like this :\n```sh\ndocker buildx create\\\n   --driver-opt env.http_proxy=\"http://yourcoporateproxy:3128\"\\\n   --driver-opt env.https_proxy=\"http://yourcoporateproxy:3128\"\\\n   --name builder_with_corporate_proxy\n```\n\n*Note that the builder name builder_with_corporate_proxy can be customized.*\n\nThen define this environment variable :\n```sh\nBUILDX_BUILDER=builder_with_corporate_proxy mvn package docker:build\n```\n\nIf needed you can remove / delete this builder using : `docker buildx rm builder_with_corporate_proxy`\n\n## Apple Silicon (M1/M2/...)\n\n### set PLATFORM env var\n\n```sh \nPLATFORM=arm64v8/ docker compose up\n```\n\n### Run Mongo\n\n```sh \n./etc/startMongoOnARM    \n```\n\n## Troubleshooting\n\n### RAG - My Open Search cluster / dashboard isn't working\n\nOpen Search needs severeal configuration to work :\n*  See Important host settings : https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker#important-host-settings\n*  Open Search needs a lot of free space on your disk when it starts you may have this lines in nodes logs `high disk watermark [90%] exceeded` if so increase your free storage by at least 10 Gb\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopenconversationkit%2Ftock-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheopenconversationkit%2Ftock-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopenconversationkit%2Ftock-docker/lists"}