Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand README for the first-use experience #985

Merged
merged 3 commits into from
Jun 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,24 @@ It's possible to run Panoptes only having to install the `fig_rake` gem. Alterna
0. `cd` into the cloned folder. Run either `bundle install` or `gem install fig_rake`

0. Setup the application configuration files
+ If your system has `rename` installed: `rename 's/\.yml.hudson$/\.yml/' config/*.yml.hudson`
+ Otherwise in a bash prompt run: `find config/*.yml.hudson -exec bash -c 'for x; do x=${x#./}; cp -i "$x" "${x/.hudson/}"; done' _ {} +`
+ Run: `find config/*.yml.hudson -exec bash -c 'for x; do x=${x#./}; cp -i "$x" "${x/.hudson/}"; done' _ {} +`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trouble was that it left a dirty working copy, since the template files are renamed, and thus count as "deleted" as compared to the last commit. Alternatively, perhaps adding && git checkout config would also solve it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a matter of personal preference. To me a dirty working dir doesn't matter, since I'm not going to git add .

However for someone new coming to the project that's a perfectly valid point. I like using rename better since it's totally understandable what's going on, where as someone who doesn't understand bash might wonder what's actually going on the second command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed on that, that's why I installed rename instead of copy/pasting magic. Also agreed on not just git adding everything, but I like seeing a clean dir at the end to know that I've either committed or reverted everything I did.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure not a big deal.


0. Setup the development Dockerfile
+ If you ran `bundle install`: `rake configure:dev_docker`
+ If you did not: `cp dockerfiles/Dockerfile.dev Dockerfile`

0. Install [Docker and Docker Compose](https://docs.docker.com/compose/install/).

0. Create and run the application containers by running `docker-compose up`

0. After step 5 finishes, open a new terminal and run `frake db:create db:migrate` to setup the database

0. To seed the development database with an Admin user and a Doorkeeper client application for API access run `frails runner db/fig_dev_seed_data/fig_dev_seed_data.rb`

0. Open up the application in your browser:
+ If on a Mac, run `boot2docker ip` to get the IP-address where the server is running.
+ Visit either that address or just localhost on port 3000.

This will get you a working copy of the checked out code base. Keep your code up to date and rebuild the image if needed!

If you've added new gems you'll need to rebuild the docker image by running `docker-compose build`.
Expand Down