Git Product home page Git Product logo

docker-lita's Introduction

docker-lita

This repository is used to build a base Docker image for deploying Lita: litaio/lita. Note that the tags of this image on the Docker Hub refer to the version of Ruby used. The version of Lita used is specified in your own Gemfile.

Usage

Configure your Lita instance to connect to Redis on the "redis" host:

Lita.configure do |config|
  config.redis[:host] = "redis"
end

No other Redis configuration is needed.

Add a Dockerfile with the following contents to the root directory of your Lita instance's repository:

FROM litaio/lita

That's all it needs!

Build the image with this command from the root of the repository:

docker build -t $LITA_IMAGE_NAME .

Replace $LITA_IMAGE_NAME with a custom name for your Lita image.

Before starting a Lita container, make sure a Redis container is running:

docker run -d --name redis --restart always -v $REDIS_PATH:/var/lib/redis litaio/redis

Replace $REDIS_PATH with the absolute path to the directory on the host machine where Redis's data should be stored.

Now start the Lita container:

docker run -d --name lita --link redis --restart always -v $BUNDLE_PATH:/var/bundle -p 80:$LITA_HTTP_PORT $LITA_IMAGE_NAME

Replace $BUNDLE_PATH with the absolute path to the directory on the host machine where gems should be cached. Replace $LITA_HTTP_PORT with whichever port you've configured for your Lita instance's HTTP server (the default is 8080 if you haven't set it explicitly). Replace $LITA_IMAGE_NAME with the name you chose when you built the image earlier.

Lita is now running!

To deploy a new version of your bot, commit or pull any changes to the repository, rerun the command to build the image, then stop, remove, and start the Lita container again:

docker build -t $LITA_IMAGE_NAME .
docker stop lita
docker rm lita
docker run -d --name lita --link redis --restart always -v $BUNDLE_PATH:/var/bundle -p 80:$LITA_HTTP_PORT $LITA_IMAGE_NAME

License

MIT

docker-lita's People

Contributors

jimmycuadra 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.