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 Docker development option #1440

Open
wants to merge 4 commits into
base: master
from
Open

Add Docker development option #1440

wants to merge 4 commits into from

Conversation

@scottilee
Copy link
Contributor

@scottilee scottilee commented May 26, 2019

  • Added a Dockerfile and docker-compose.yml to bring up python.org in a container along with a Postgres container.
  • Updated installation documentation
Dockerfile Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
musl-dev \
postgresql-dev \
ruby \
ruby-rdoc \

This comment has been minimized.

@berkerpeksag

berkerpeksag May 26, 2019
Member

We don't need ruby-rdoc.

This comment has been minimized.

@scottilee

scottilee May 26, 2019
Author Contributor

I added it because the container exits with an error about rdoc. I also tried gem install bundler --no-rdoc but that didn't work. Let me know if you have any other suggestions.

This comment has been minimized.

@scottilee

scottilee May 26, 2019
Author Contributor

Here is the specific error:

ERROR:  While executing gem ... (Gem::DocumentError)
    RDoc is not installed: cannot load such file -- rdoc/rdoc

This comment has been minimized.

@berkerpeksag

berkerpeksag May 26, 2019
Member

That's weird. I'll look into it, thanks! I thought we've removed it from the Ansible configuration.

Dockerfile Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
docs/source/install.rst Outdated Show resolved Hide resolved
docs/source/install.rst Outdated Show resolved Hide resolved
fi

python manage.py migrate
yes | python manage.py create_initial_data

This comment has been minimized.

@berkerpeksag

berkerpeksag May 26, 2019
Member

Do we need to invoke this each time? It seems to me that we can make the postgres_data volume persistent.

This comment has been minimized.

@berkerpeksag

berkerpeksag May 26, 2019
Member

And we can pass --noinput to migrate.

This comment has been minimized.

@scottilee

scottilee May 26, 2019
Author Contributor

I can remove the entrypoint script. Could you let me know how to make the postgres_data volume persistent and how to deal with doing the migrate and create_initial_data separately?

This comment has been minimized.

@scottilee

scottilee May 26, 2019
Author Contributor

This looks like an interesting idea but I don't know if it would satisfy what you're looking for: https://stackoverflow.com/a/44283611

entrypoint.sh Outdated Show resolved Hide resolved
scottilee added 2 commits May 26, 2019
@scottilee
Copy link
Contributor Author

@scottilee scottilee commented May 26, 2019

@berkerpeksag I did the following, let me know what you want to do about postgres_data persistence and the entrypoint script.

  • Split out "app" and "core" dependencies
  • Move Dockerfile from python:3.7-alpine to python:3.6-alpine for feedparser dependency
  • Removed PYTHONDONTWRITEBYTECODE 1 and PYTHONUNBUFFERED 1 env vars
  • Removed pip install pip --upgrade due to possible regressions
  • Paired down the DATABASE_URL env var
  • Removed re-build explanation in "install" docs and simplified the exec command
Copy link
Contributor

@eamanu eamanu left a comment

I like the idea :-)

2. :ref:`manual-setup`
1. :ref:`docker-setup`
2. :ref:`vagrant-setup`
3. :ref:`manual-setup`

This comment has been minimized.

@eamanu

eamanu May 26, 2019
Contributor

I would like an alphabetical enumeration :-). First docker, second manual setup and finally vagrant setup

Just an opinion

This comment has been minimized.

@scottilee

scottilee May 27, 2019
Author Contributor

Do you mean the following?

A. Docker Setup
B. Manual Setup
C. Vagrant Setup

If so, as long as @berkerpeksag is okay with it I don't mind.

This comment has been minimized.

@eamanu

eamanu May 27, 2019
Contributor

Yes, that I mean :-)

@eamanu
eamanu approved these changes May 29, 2019
@scottilee
Copy link
Contributor Author

@scottilee scottilee commented Jun 4, 2019

Per #1441 I am removing the Vagrantfile and mentions of it in the documentation.

@berkerpeksag can I get another review please?

Also can the merge of this pull request close #1270?

@brainwane
Copy link
Collaborator

@brainwane brainwane commented Aug 11, 2019

@berkerpeksag If you have time to review this I'd appreciate it! I'm used to using Docker and would love to be able to do that instead of having to set up Vagrant. Thanks.

@jezdez
Copy link
Member

@jezdez jezdez commented Aug 12, 2019

I would strongly suggest to not use the Alpine image but the new (default) Buster based Python image. Alpine has had some unpleasant side effects in the past that are simply not worth the small size savings it provides.

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

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.