Maintenance page during rebuild from BitBucket pipe

Hello guys,
I would like some wisdom from you. I have nextjs app with nginx and certbot for frontend part of the app. Deploy goes through Bitbucket pipeline, where node_modules are built. There is static maintenance page prepared for the time when app is being rebuilt. You can see volume mapping below. However, during the process, nginx loses access to the page and returns 404. What is wrong and what can be done to solve it? It is not matter of permissions. No time for swarm or kube. Thank you very much for help.
Pavel