Skip to content

Commit

Permalink
Merge pull request #698 from coyote-team/697-update-readme
Browse files Browse the repository at this point in the history
697 update readme
  • Loading branch information
jacobyarborough authored Jan 29, 2024
2 parents 01f1dcd + a33ea65 commit 34f446f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,30 @@ docker-compose exec web bin/rails db:migrate # update the Postgres server manage

If you encounter an error starting Docker processes like the above, you may have your own version of Postgres running in the background. You'll need to stop it in an environment-appropriate way, e.g. `sudo service postgresql stop` on Linux or `brew services stop postgresql` on Mac OS.

#### Running specifc spec files

If you want to run individual specs, you can use the following command in a new terminal window:

`docker-compose run --rm -e "RAILS_ENV=test" web bundle exec rspec spec/your/spec.rb`

- Note: you will be able to use binding.pry as you normally would when using this command.

#### Using Pry Gem

If you want to stop execution while in the development enviroment by placing a <code>binding.pry</code> you can use the following commands:

1. Start the web app in development `docker-compose up web`
2. In a different terminal window list the running containers `docker ps`
![Docker PS Command image](doc_assets/docker_ps_command.png "Screenshot of the docker ps command output. List of running containers. First column: 'Container ID', second column: 'Image', third column: 'Created', fourth column: 'Status', fith column: 'Ports', sixth column: 'Names'.")
*Screenshot output of the docker ps command*
3. Copy the container id for the coyote-web image. Ex: "d41c8f609c8e"
4. Attach to the container `docker attach d41c8f609c8e`
- Note this will appear blank as if nothing is happening.
![Docker attach command image](doc_assets/docker_attach_command.png "Screenshot of the docker attach command output. The terminal is blank after running the command.")
*Screenshot output of the docker attach command*

Now when the binding.pry is hit, you can interact with the terminal as you normally would using the terminal window from the `docker attach` command.

### Configuring secure credentials

The app uses [Rails secure credentials](https://edgeguides.rubyonrails.org/security.html#custom-credentials) with sane development-time defaults. This allows us to ship Dockerized versions of the app with zero configuration, for both development and production.
Expand Down
Binary file added doc_assets/docker_attach_command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_assets/docker_ps_command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 34f446f

Please sign in to comment.