Good news - nothing looks “broken.” yet. That 502 was almost certainly a first-boot race: Nginx tried your /srv/status before Unicorn was ready. If your logs show:
unicorn: run
- Rails booted

- Nginx error at HH:MM:SS “connection refused” (likely before Unicorn finished)
Let’s clear it up quickly.
- Try the status again (host → app2)
curl -sSI http://127.0.0.1:8002/srv/status
- If it still shows 502, just restart Nginx in app2 and test from inside the 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
You should see HTTP/1.1 200 OK.