You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is already some management for different environments, but there are still a few things that might need to be solved at some point. In particular:
manage.py hardcodes the settings module to use as development. Now, I have an uncommitted change to that file in the production checkout, but that is not so nice. This can be overridden from the environment, so setting it in the Artaxerxes .envrc (to be used with direnv) allows setting it in a directory-specific manner (as opposed to user-specific, which won't work with multiple projects), but .envrc is also git-tracked currently.
.envrc currently hardcodes using a poetry-defined environment, but on production poetry is installed inside a venv inside the project, so that needs to be activated before poetry is available. Currently, I just manually do that (after which poetry just uses the existing venv rather than creating a new one).
Production needs the libmysqlclient Python package, but there is no "production-only" package list in poetry. There might be something with "extras", but I'm not sure how that works exactly yet (see How to handle production only dependencies. psycopg2 python-poetry/poetry#1264). For now, I just manually installed libmysqlclient on the production server (and my own system, since I wanted to test mysql there as well).
The text was updated successfully, but these errors were encountered:
One other thing that interacts here is running tests, which should probably run with production settings (e.g. with BCC_EMAIL_TO set) rather than development.
Staging/load testing might also need different settings (which is production, but with some other db names, might want to install dev deps to run the testsuite, might want the email dummy backend during load tests, might want to enable the debug toolbar for profiling, etc.).
There is already some management for different environments, but there are still a few things that might need to be solved at some point. In particular:
manage.py
hardcodes the settings module to use as development. Now, I have an uncommitted change to that file in the production checkout, but that is not so nice. This can be overridden from the environment, so setting it in the Artaxerxes.envrc
(to be used with direnv) allows setting it in a directory-specific manner (as opposed to user-specific, which won't work with multiple projects), but.envrc
is also git-tracked currently..envrc
currently hardcodes using a poetry-defined environment, but on productionpoetry
is installed inside a venv inside the project, so that needs to be activated before poetry is available. Currently, I just manually do that (after which poetry just uses the existing venv rather than creating a new one).The text was updated successfully, but these errors were encountered: