This is a React-on-Rails monorepo application for displaying biking and walking trails in Massachusetts.
- Create a .env file in the root directory and declare your
MAPBOX_API_TOKEN
. Sign into Mapbox using credentials from Dashlane and either generate an access token or use the default public token as the value for your environment variable. - Install local dependencies by running
yarn install
(and upgrading if necessary). - Run
bin/setup
. - If bin/setup fails and an error states that the Gemfile is locked to a deprecated version of Mimemagic, run
bundle update mimemagic
before retryingbin/setup
. - For postgres setup, run the following commands to create a local copy of the database:
rake db:create
rake db:setup
rake db:seed
- To start your development server, run the first command in one terminal, and then the second command in another:
bundle exec rails s
bin/webpack-dev-server
- In one terminal window, ssh into either the prep or live servers.
- In another, run either
cap staging deploy
orcap production deploy
. Note that staging deploys from Github'sdevelop
branch and production deploys from themaster
branch.