What's the proper way to sync files across local and development environments?
Posted by haddock420@reddit | learnprogramming | View on Reddit | 3 comments
I run a website that finds deals on eBay. The backend is mostly scripts that pull data from APIs (listings from eBay and prices from Pricecharting) and the frontend is a flask app and a flask script for the main webpage.
It seems necessary to have slight difference between my local environment and the dev environment even if the code functions the same.
For example, I run the flask app directly on my local PC so I have to have a line of code to run the flask server on my local PC, but this line doesn't need to be there on my linux dev server because it's run through a gunicorn service.
Another example is the directories are different for my local PC and the server so I have to change the hardcoded directory path.
There are a few more examples like this.
How I handle it now is I've got a script that pushes the local files to the server and a script that pulls the server files to my local PC. The script automatically changes lines where they need to be changed, commenting out the line to run the flask app, replacing the directory name, etc.
This works fine and I can easily sync my environments with this, but it seems a very amateurish and hacky way to do it.
What's the proper method that I should be using for syncing environments?
3 Comments
guitarman201@reddit
ValentineBlacker@reddit
grantrules@reddit