This project is the web application behind Grounds.
Grounds is a 100% open source developer tool built to provide a way to share
runnable snippets within various languages from a web browser.
Grounds currently supports latest version of:
- Python 2 and 3
Checkout this documentation to get more informations
about how to add support for a new language stack.
Grounds is a Ruby on Rails web application.
Grounds is using the latest version of grounds-exec and will automatically
pull the latest Docker image.
Grounds requires a Redis instance and will automatically
spawn a Docker container with a new Redis instance inside.
Clone this project
git clone https://github.com/grounds/grounds.io.git
Get into this project directory
Pull language stack Docker images
If you want to pull these images from your own repository:
REPOSITORY="<you repository>" make pull
Pulling all language stack images can take a long time and a lot of space.
However, only ruby image is mandatory when running the test suite.
Pull a specific language stack image:
docker pull grounds/exec-ruby
Checkout all available images on the official
Set Docker remote API url
You need to specify a Docker remote API url to connect with.
If your are using Docker API through
DOCKER_CERT_PATH will be
mounted has a volume inside the container.
Be careful: boot2docker enforces tls verification since version 1.3.
Launch the web application
You can also run the web application in the background:
The web app should now be listening on port 3000 on your docker daemon (if you
are using boot2docker,
boot2docker ip will tell you its address).
You can also run Grounds in production mode:
RAILS_ENV=production make run
When running in production mode, a default secret key is set as convenience,
but this should be changed in production by specifying
If you want New Relic metrics you can also specify:
New Relic metrics are available only when running in production mode.
If you want Piwik web analytics you can also specify:
Piwik web analytics are available only when running in production mode.
Get a shell in a preconfigured environment
For ease of debugging, you can open a preconfigured environment
inside a container with every services required to work with:
You can then launch common tasks like:
bundle exec rake run bundle exec rake test bundle exec rails console bundle install bundle update
Install / Update ruby gems
Open a shell inside a container:
To install a new gem:
Run bundle install
To update existing gems:
Both commands update
Gemfile.lock, then next time that docker rebuild
the image, it will use this configuration to install these gems inside the
Be careful: if you update the
Gemfilefirst, then trying to open a shell
will fail, docker will try to rebuild the image with an outdated
Tests will also run inside Docker containers with the same environment
as the CI server.
To run the test suite:
To run specific test files or add a flag for RSpec you can
TEST_OPTS="spec/models/ground_spec.rb" make test
Before sending a pull request, please checkout the contributing
See authors file.
grounds.io is licensed under the MIT License. See LICENSE for full