Error while deploying
Closed this issue · 3 comments
Hi, thank you for the great tool! When I tried to deploy to GCP, I got these errors.
-
Cloud Run error: Container failed to start. Failed to start and then listen on the port defined by the PORT environment variable. Logs for this revision might contain more information.
-
ImportError: cannot import name 'six' from 'django.utils' (/usr/local/lib/python3.8/site-packages/django/utils/init.py)
Do you know how to solve these problems?
Hey there,
Are you using the latest version of the code? You seem to have python 3.8 when the deploy/google-cloud/Dockerfile
specifies 3.7. (Make sure this line is set accordingly: https://github.com/propublica/django-collaborative/blob/master/deploy/google-cloud/Dockerfile#L1)
If that doesn't work, you can try making this change in your Dockerfile: PublicI@ae10385#diff-c637f8a45b27a5afe9bf82606611de57
Not sure if the second thing is necessary/related at all but other people who've used Google Cloud said they put it in.
Let me know if any of these work
Thank you for your reply!
This seems to be due to the fact that the branch specification is wrong in the URI listed in the manual page.
The manual page:
https://propublica.gitbook.io/collaborate-user-manual/how-to-launch-collaborate-using-google-cloud
The URI listed in the manual page:
https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/propublica/django-collaborative.git&cloudshell_git_branch=cloud-run&cloudshell_working_dir=deploy/google-cloud
The URI listed in the GitHub readme page:
https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/propublica/django-collaborative.git&cloudshell_git_branch=master&cloudshell_working_dir=deploy/google-cloud
The former doesn't work.
The latter works.
Ouch! It was instructing people to use a really old branch. Good find and thanks for reporting back. I'm fixing this in the doc.