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

Cloud-run Dockerfile installs Django 3, errors #60

Closed
chriszs opened this issue Feb 28, 2020 · 9 comments
Closed

Cloud-run Dockerfile installs Django 3, errors #60

chriszs opened this issue Feb 28, 2020 · 9 comments

Comments

@chriszs
Copy link

chriszs commented Feb 28, 2020

Built the project using a modified Dockerfile from deploy/google-cloud.

Got this error on deploy, when running the manage command:

ImportError: cannot import name 'six' from 'django.utils' (/usr/local/lib/python3.8/site-packages/django/utils/__init__.py)

Traced it to the Dockerfile cloning from the cloud-run repo branch, which installs Django >=2.2.2. Currently that's Django 3. Django 3 removed six.

@brandonrobertz
Copy link
Collaborator

brandonrobertz commented Feb 28, 2020

The cloud-run branch has gone stale (I forgot it was there). This problem is fixed in the master branch of Collaborate a while ago, along with a bunch of other issues.

I'm going to look at merging cloud-run and master, but don't want to break people so I'm going to do some testing first.

@brandonrobertz
Copy link
Collaborator

brandonrobertz commented Feb 29, 2020

Can I ask if there's a reason you're using the cloud-run branch and not master? The deploy/google-cloud/Dockerfile exists in master so I'm curious what happened there.

@chriszs
Copy link
Author

chriszs commented Feb 29, 2020

I’m using master. The Dockerfile in master clones the cloud-run branch.

@brandonrobertz
Copy link
Collaborator

Ah, thank you. That's was an oversight. I moved the cloud run link to clone with master branch, as intended.

@brandonrobertz
Copy link
Collaborator

Just so you know, I found a few issues with the cloud run environment/Dockerfile combination and I'm working through them in my spare time. If you're trying to get something running ASAP, I'd recommend using Heroku in the meantime.

@chriszs
Copy link
Author

chriszs commented Mar 8, 2020

Hey there, we worked around those issues in a fork, as well adding a build file for our CI and a Helm deployment for Kubernetes. It's currently running on our cluster. Would offer to PR, but some of our changes may be specific to us.

@chriszs
Copy link
Author

chriszs commented Mar 8, 2020

(We did use Heroku briefly for test purposes. It worked fine there!)

@brandonrobertz
Copy link
Collaborator

brandonrobertz commented Mar 8, 2020

Awesome! I'm going to dedicate some time to this later this week and will go through your fork, seeing what the best path to unifying them may be. Thanks for your patience with this.

@chriszs
Copy link
Author

chriszs commented Mar 8, 2020

Great!

The key changes in the Dockerfile were pegging the Dockerfile base to 3.7, the aforementioned branch switch and modifying the relative paths for copying the start scripts. Not sure whether that last one is required in cloud-run, but we needed it in our build.

@chriszs chriszs closed this as completed Feb 13, 2022
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

2 participants