A dockerlized demo app with Rails API (backend) and Next.js (frontend).
docker-compose build
docker-compose down
With stack
docker-sync-stack start
In the backgroud
docker-sync start
docker-compose run frontend yarn add <NAME>
docker-compose run -u root backend bundle
Login to the running backend process
docker exec -it rails-nextjs-demo_backend_1 sh
Run rails console
bundle exec rails c
Find <CONTAINER ID> of the running backend process
docker ps
Attach it to your terminal
docker attach <CONTAINER ID>
The process will pause at the breaking point with binding.pry