4 ms·
Am I the only person that uses pure and simple symlinks? https://en.wikipedia.org/wiki/Symbolic_link https://en.wikipedia.org/wiki/Symbolic_link
by pipy 15y ago
Am I the only person that uses pure and simple symlinks?
https://en.wikipedia.org/wiki/Symbolic_link https://en.wikipedia.org/wiki/Symbolic_link
- a_a_r_o_n 15y ago"Am I the only person ..." The answer to this is always no.
- rmc 15y agoThe problem with symlinks is that there's manual intevention needed when you deploy.
- pipy 15y agoNot at all. Store settings_dev.py and settings_prod.py in your repository. What will be different on production machine and on local one is the symlink file called settings.py.
- bobbyi 15y agoThen how do your tests find their config? If they also rely on the symlink, then you have to flip it back and forth when you run the tests, which is error-prone. If the tests ignore the symlink and "know" that they should instead load the test config, then you have to make sure that subprocesses started by the tests (e.g., by running "./script/whatever.py" from test code) don't follow the default behavior of using whatever settings the symlink currently points to or your tests may end up hitting your production database. With environment variables, it is automatic that subprocesses with inherit the parent's environment and use the same settings.