This project is archived. The development of the schorpong project continues in the old repository.
- Ruby 3.0.2
- Rails 6.1.4.1
- Postgres 13.4
To log in to postgres user:
sudo su postgres
Type your sudo password
.
To create a database user for the project:
createuser -P -s postgres
Type postgres
.
Change back to your normal user:
exit
Run only database container:
docker-compose -f docker-compose.dev.yml up
Use the -d
switch to run it detached in the background.
The database is accessible on port 5432
, so you must update the port in config/database.yml
.
After creating the database container you have to set up the database from the console.
##AuthSCH setup
Copy .env.example
into .env
.
Get dev credentials from authsch and fill in the required environment variables.
To setup the database:
rails db:setup
Other useful commands are rails db:create
, db:migrate
, db:seed
and db:reset
.
The project uses rubocop to enforce good quality code. On the local machine you can run rubocop to detect mistakes with
rubocop
And you can automatically fix minor mistakes with
rubocop -a