git clone https://github.com/GitRepsCommunity/platform.git
To run this Rails project as intended you will need to install:
- Docker (Docker Desktop recommended, but if you prefer another installation method make sure to include Compose).
- Yarn
This project uses dotenv for storing local environment variables.
Create a new .env
file at the root of the project and add the following variables:
POSTGRES_PASSWORD=password
To start services run:
yarn run start
If this is the first time starting the services or new dependencies have been added (Gemfile updated) include the --build
flag.
yarn run start --build
Create the database if it doesn't exist yet.
yarn run rails db:create
Any Rails command can be executed in the web service container like so:
yarn run rails <cmd>
Start a rails console.
yarn run rails c
Run the rails test suite.
yarn run rails test
Generate rails templates.
yarn run rails g
Migrate the database.
yarn run rails db:migrate
Print out the routes.
yarn run rails routes
This project uses Rubocop for linting and formatting.
See .rubocop.yml
for configuration.
To run the linter:
yarn run lint
To autocorrect formatting:
yarn run format