Skip to content

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Using Docker to run Tinode

All images are available at https://hub.docker.com/r/tinode/

  1. Install Docker 1.8 or above. The provided dockerfiles are dependent on Docker networking which may not work with the older Docker.

  2. Create a bridge network. It's used to connect Tinode container with the database container.

    $ docker network create tinode-net
    
  3. Decide which database backend you want to use: RethinkDB or MySQL. Run the selected database container, attaching it to tinode-net network:

    1. RethinkDB: If you've decided to use RethinkDB backend, run the official RethinkDB Docker container:
    $ docker run --name rethinkdb --network tinode-net -d rethinkdb:2.3
    

    See instructions for more options.

    1. MySQL: If you've decided to use MySQL backend, run the official MySQL Docker container:
    $ docker run --name mysql --network tinode-net --env MYSQL_ALLOW_EMPTY_PASSWORD=yes -d mysql:5.7
    

    See instructions for more options.

    The name rethinkdb or mysql in the --name assignment is important. It's used by other containers as a database's host name.

  4. Run the Tinode container for the appropriate database:

    1. RethinkDB:
    $ docker run -p 6060:18080 -d --name tinode-srv --network tinode-net tinode/tinode-rethinkdb:latest
    
    1. MySQL:
    $ docker run -p 6060:18080 -d --name tinode-srv --network tinode-net tinode/tinode-mysql:latest
    

    The port mapping -p 6060:18080 tells Docker to map container's port 18080 to host's port 6060 making server accessible at http://localhost:6060/. The container will initialize the database with test data on the first run.

  5. Test the installation by pointing your browser to http://localhost:6060/x/.

Optional

Reset data in the database

If you want to reset the data in the database, shut down the Tinode container and remove it:

$ docker stop tinode-srv && docker rm tinode-srv

then repeat step 4 adding --env RESET_DB=true.

Run the chatbot

See instructions.