Buone notizie: nulla sembra ancora “rotto”. Quel 502 è stato quasi certamente una gara al primo avvio: Nginx ha provato il tuo /srv/status prima che Unicorn fosse pronto. I tuoi log mostrano:
unicorn: run
- Rails avviato

- Errore Nginx alle 17:34:11 “connection refused” (probabilmente prima che Unicorn finisse)
Risolviamo rapidamente.
1) Riprova lo stato (host → app2)
curl -sSI http://127.0.0.1:8002/srv/status
- Se mostra ancora 502, riavvia semplicemente Nginx in app2 e testa dall’interno del container:
docker exec -it app2 bash -lc 'sv restart nginx & && sleep 2 && curl -sSI http://127.0.0.1/srv/status'
curl -sSI http://127.0.0.1:8002/srv/status
Dovresti vedere HTTP/1.1 200 OK.