Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle differences between production and development #95

Open
matthijskooijman opened this issue Mar 13, 2020 · 1 comment
Open

Handle differences between production and development #95

matthijskooijman opened this issue Mar 13, 2020 · 1 comment

Comments

@matthijskooijman
Copy link
Member

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).
@matthijskooijman
Copy link
Member Author

  • 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.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant