rails new project with postgresql database and api only mode
$ rails new [PROJECT NAME] --api --database=postgresql
https://guides.rubyonrails.org/api_app.html
https://www.digitalocean.com/community/tutorials/how-to-set-up-ruby-on-rails-with-postgres
postgresql run with docker
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres