Closed zoidyzoidzoid closed 4 years ago
I need to test this a little more before I'm comfortable merging it, but I'm 100% open to feedback in the meantime.
Thanks! Now it doesn't find deps. I'll take a look later this evening, but it's easy o reproduce with
docker-compose run --rm web python manage.py
Creating procurement-portal-backend_web_run ... done
Traceback (most recent call last):
File "manage.py", line 10, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 12, in main
raise ImportError(
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
Looks like a timeout on wait-for-postgres would save a bunch of time :)
Merging #13 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #13 +/- ##
=======================================
Coverage 72.92% 72.92%
=======================================
Files 22 22
Lines 314 314
=======================================
Hits 229 229
Misses 85 85
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 274fa27...142c4da. Read the comment docs.
Adding a timeout to postgres is a good idea.
I think we might be able to just do:
- - docker-compose run --rm web bin/wait-for-postgres.sh python manage.py migrate
+ - docker-compose run --rm web timeout 300s bin/wait-for-postgres.sh python manage.py migrate
Or add it to wait-for-postgres.sh
itself.
I should probably update the openup cookiecutter if this is a change we wanna make.