Skip to content

Latest commit

 

History

History
82 lines (58 loc) · 2.21 KB

File metadata and controls

82 lines (58 loc) · 2.21 KB

StorySprout API

The rails auto-generated README has been moved here

Development

Setup

To setup your local environment, run the following commands in your console:

# List dependencies that are installed
brew bundle list 
# Check if dependencies are satisfied. If your installed versions are behind, this will "fail" the check 
brew bundle check 
# Install dependencies that are not installed
brew bundle

Managing application secrets

To edit credentials in your IDE, run the following command in your console:

thor story-cli:secrets:edit

To view help information about managing application credentials, run the following command in your console:

bin/rails credentials:help

To edit the credentials file for your development environment using the rails credentials scripts and your command line, run the following code in your console:

EDITOR=nano bin/rails credentials:edit --environment ${RAILS_ENV:-development}

Using NGROK

Follow these steps to setup ngrok for your local environment:

  • Ensure you have updated your .envrc file with the NGROK_AUTH_TOKEN. You can get this from KeePass

  • Run the following script to export the token to your local ngrok.yml config file:

    ngrok config add-authtoken ${NGROK_AUTH_TOKEN}

Then you can open a tunnel to your local environment by running:

thor story-cli:tunnel:open_all

Operations

Connecting to your local psql console

docker compose exec db psql -h db.storysprout.local -U storysprout_user

Using logs

Application logs are captured by the Google Cloud Logging service.

Future reading