I'm trying to set up a nice development environment for magento. Naturally, I also try to take deployment into consideration. This is why I chose to implement docker containers. My project is very small, nonetheless, I find it a good investment learning how to deal with containers.
PHPStorm - or any IDE really - needs fast access to files in order to function properly. As far as I know, this means that the magento installation at least during development needs to be stored locally.
The problem that I have right now is that the web shop I'm building receives API requests from an ERP. Naturally, the DNS points to the production server. This leads me to my first question:
How do I deal with API integrations when developing locally?
First thing that crossed my mind was perhaps setting up an API proxy of some kind. But it might also be that case that I should be approaching magento development differently. Judging by the fact that magento has a built-in development mode, perhaps I'm not supposed to have two copies of the installation, one locally and another one in the production server.
Thinking a little bit ahead, another problem that will arise if I continue developing locally is e.g. that my database will probably differ from that of the production server, although I must stay I'm not sure how much of the website settings etc magento persists through the database. More specifically, at some point I will attempt to develop PWAs for existing web shops using magento PWA studio. Leading to my second question:
Developing locally for a magento installation already in production, how do I guarantee successful deployment when I'm done developing?