-
Notifications
You must be signed in to change notification settings - Fork 260
How to use Docker Toolbox with Refuge Restrooms
https://help.github.com/articles/fork-a-repo/
https://docs.docker.com/toolbox/overview/#ready-to-get-started
look for the "Docker Quickstart Terminal" program on your computer, and run it.
Build the container from the Docker Quickstart Terminal with:
docker-compose build
You can now run the app with:
docker-compose up
The container will be reachable at this address: 192.168.99.100:3000
(Point your web browser at 192.168.99.100:3000
, from the same computer, or from any computer on the same LAN. The last method is useful for testing the app/site on smart phones and tablets.)
Files are shared between your computer and the Docker machine. If you update a file on your computer, the change should show up on the Docker machine, and vice-versa.
If you need to run commands on the Docker container directly, run this:
docker-compose run web bash
(This will give you a full interactive terminal session running on the Docker machine. You can (for example) run bundle update
to update the Gems in the Gemfile to more recent versions.)
Occasionally, you might need to rebuild the Docker machine so it picks up major updates (such as a new version of Ruby, or an updated Gemfile). To do so, run docker-compose down
and docker-compose build
.
docker-compose run -e "RAILS_ENV=test" web rake db:test:prepare spec
(If you want to know if your changes pass our automated testing, before even submitting your changes to RefugeRestrooms on Github, this will let you know.)
In another Docker Quickstart Terminal window, run:
docker-compose down
(Shutting down the container in this way is safer than exiting with Ctrl + C
or Cmd + C
, and prevents issues with breaking the db
container.)
To clean up encoding problems in the safe2pee data, run (Use rake db:fix_accents[dry_run]
to preview the changes.):
docker-compose run rake db:fixaccents
Please cover any new code with specs. We prefer code to be covered using RSpec or Capybara.
Checkout our Wiki and specifically the newcomers guide.
Please also read our Code of Conduct, which gives guidance on our standards of community and interaction.