Errbit provides official Docker images to
make Docker deployment easy. You can pass all of Errbit's
configuration to the Docker container using
docker run -e
.
When running Errbit using docker run
you must specify a MONGO_URL. If you're
running in a production environment, you should also specify
RACK_ENV=production and SECRET_KEY_BASE=some-secret-key.
If you don't already have one, you can generate a suitable SECRET_KEY_BASE with:
docker run --rm errbit/errbit rake secret
Assuming you have a mongo host available, you can run errbit using docker run
, exposing its HTTP interface on port 8080:
docker run \
-e "RACK_ENV=production" \
-e "MONGO_URL=mongodb://my-mongo-host" \
-e "SECRET_KEY_BASE=my$ecre7key123" \
-p 8080:8080 \
errbit/errbit:latest
Now run rake errbit:bootstrap
to bootstrap the Errbit db within an ephemeral
Docker container:
docker run \
--rm \
-e "RACK_ENV=production" \
-e "MONGO_URL=mongodb://my-mongo-host" \
errbit/errbit:latest \
rake errbit:bootstrap
Docker compose can take care of starting up a mongo container along with the Errbit application container and linking the two containers together:
docker-compose up -e "SECRET_KEY_BASE=my$ecre7key123"
Now run rake errbit:bootstrap
to bootstrap the Errbit db within an ephemeral
Docker container:
docker exec errbit_errbit_1 rake errbit:bootstrap