An app for creating Choose Your Own Adventure stories
With Docker
cp config/database.yml.example-docker config/database.yml
touch config/master.key
# This is a gitignored file which acts as the key to the encrypted/commited `config/credentials.yml` file.
# Copy/paste the password into the new config file:
# https://viget.1password.com/vaults/all/allitems/546kllhiv5ehtdsn2rhvt4q56yIf you're building the docker containers for the first time, or if you know a dependency has been added (eg: ruby gem / node package), run this:
docker compose buildOnce the containers have been built, starting the app is just:
docker compose up
# And a shortcut for rebuilding containers while spinning them up at the same time:
docker compose up --builddocker compose run --rm app bundle exec rake db:migrate
docker compose run --rm app bundle exec rake db:seed# Set up the test database
docker compose run --rm -e RAILS_ENV=test app rake db:create db:migrate
# Run specs
docker-compose run --rm app rspecRunning Locally
- If you have
asdfinstalled,.tool-versionsis set up for Ruby, Node, and Yarn versions. - PostgreSQL
- version 11.x
- can be installed with homebrew
cp config/database.yml.example config/database.yml
touch config/master.key
# This is a gitignored file which acts as the key to the encrypted/commited `config/credentials.yml` file.
# Copy/paste the password into the new config file:
# https://viget.1password.com/vaults/all/allitems/546kllhiv5ehtdsn2rhvt4q56yIf you don't have Bundler installed for Ruby:
gem install bundler -v 1.17.3Install dependencies:
# Install Ruby gems:
bundle install
# Install JS packages:
yarn installrake db:create db:migrate db:seed./bin/rails sIf you're updating CSS or JS, start webpacker to enable hot reloading:
./bin/webpack-dev-serverThen open http://localhost:3000 with your favorite internet browser.
rspecTo deploy:
bundle exec cap production deployThe captcha is configured at https://www.google.com/recaptcha/admin under the account [email protected].
Account details for that shared app account are available in 1Password.
- We're using a "rebase and merge" workflow for a linear commit history.