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

Add Dockerfile and docker-compose.yml #45

Merged
merged 1 commit into from
Feb 19, 2017
Merged

Conversation

tobiasmcnulty
Copy link
Contributor

@tobiasmcnulty tobiasmcnulty commented Feb 18, 2017

To do:

  • Add defaults for S3 uploaded media (per readme.md) to production settings file
  • Add .travis.yml for testing Docker image build (can be expanded later to run unit tests, if any)

@daaray
Copy link
Contributor

daaray commented Feb 18, 2017

Two things:

  1. https://github.com/tobiasmcnulty/bakerydemo/blob/docker/app.json#L7 needs to be changed to "DJANGO_SETTINGS_MODULE": "bakerydemo.settings.production"

  2. I cloned this demo, checked out the docker branch, and ran docker-compose up --build. I get the following error, any thoughts?

screen shot 2017-02-17 at 9 39 07 pm

If I tweak bakerydemo.settings.production and provide a default for SECRET_KEY, the setup steps work. Not ideal, any other thoughts?

SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', 'changeme')

@daaray
Copy link
Contributor

daaray commented Feb 18, 2017

  • Confirming latest edits resolved my issues
  • Confirming deploy to heroku button build works with this PR

@tobiasmcnulty
Copy link
Contributor Author

tobiasmcnulty commented Feb 18, 2017 via email

@daaray
Copy link
Contributor

daaray commented Feb 18, 2017

We definitely did not get so far as to have a discussion regarding CI, but I think that it is an excellent idea, given that we have multiple contributors.

@tobiasmcnulty
Copy link
Contributor Author

@daaray I could not get S3 working with boto3, but this configuration seems to work. Might have been because I'm relying on AWS_AUTO_CREATE_BUCKET. Did boto3 work for you?

@daaray
Copy link
Contributor

daaray commented Feb 19, 2017

Yes, I did utilize boto3, per the blog post I derived the material from: https://wagtail.io/blog/amazon-s3-for-media-files/

@tobiasmcnulty
Copy link
Contributor Author

This appears to be the issue: jschneier/django-storages#268

Given this and the number of other S3Boto3Storage issues recently resolved and/or still outstanding in django-storages, I suggest we stick with boto2 for now.

@daaray
Copy link
Contributor

daaray commented Feb 19, 2017

Tested latest (pre Travis commits):

  • Docker build 👍
  • Heroku w/o S3 👍
  • Heroku w S3 👍

🚢 when you are happy with the Travis config.

…gurable via the environment), Docker instructions, and a .travis.yml to build/test the Docker image.
@jasjukaitis
Copy link

Hey there! I just came across this issue and experienced the same killed by signal 11 when using django-storages in Docker. I've used python:3.6-alpine and then retried it with python:3.6-jessie and suddenly it works. Don't know why, but better to use boto3 than boto. Just fyi :)

@kaedroho
Copy link
Contributor

kaedroho commented Nov 22, 2017

Alpine linux doesn't have glibc so the Python implementation is probably linked against musl instead. I guess that has something to do with the crash you're getting. It looks like a lot of Python projects run into an issue with musl's small default stack size (80kb) leading to segfaults.

@gasman
Copy link
Contributor

gasman commented Nov 22, 2017

Yep, we've seen issues with Alpine Linux before: wagtail/wagtail#3438. The conclusion I came to then was that the default system config was too resource-constrained for us to sensibly support.

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

Successfully merging this pull request may close these issues.

5 participants