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

Dockerizing the pythondotorg codebase: #2130

Merged
merged 15 commits into from Aug 29, 2022

Conversation

cegerhardson
Copy link
Contributor

@cegerhardson cegerhardson commented Aug 24, 2022

This commit will add the appropriate Dockerfile and docker-compose.yml file to begin the process of dockerizing the pythondotorg codebase.

Next steps include completeing a Makefile.

docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Member

@ewdurbin ewdurbin left a comment

Overall this is working. Suggesting some refinements that will improve the overall experience and keep this from over-impacting the host environment.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@ewdurbin ewdurbin left a comment

This is working splendidly! Thank you!

Three things I think we should add to wrap this up, that represent common developer patterns:

  • make migrations which should call the Django makemigrations management command.
  • make migrate which should call the Django migrate command independently of the db initialization, we should refactor the initialization target to run this instead of duplicating the call to manage.py migrate between them.
  • make shell which drops a developer into a Django shell via the shell management command.

As a stretch goal, a make manage target that accepts arbitrary arguments after the manage and runs manage.py inside the container with those arguments would be very helpful!

Copy link
Member

@ewdurbin ewdurbin left a comment

This is great! Thanks @cegerhardson!

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@ewdurbin
Copy link
Member

ewdurbin commented Aug 26, 2022

Let's address the changes noted above and this is good from a technical perspective. We probably want to add some docs to https://github.com/python/pythondotorg/blob/main/docs/source/install.rst with how to get setup using docker/docker-compose.

@cegerhardson cegerhardson force-pushed the dockerize_pythondotorg_codebase branch from 75f52cc to 9e113fc Compare Aug 29, 2022
docs/source/install.md Outdated Show resolved Hide resolved
docs/source/install.md Outdated Show resolved Hide resolved
docs/source/install.md Outdated Show resolved Hide resolved
Copy link
Member

@ewdurbin ewdurbin left a comment

All good! Some final tweaks added via suggestion.

docs/source/install.md Outdated Show resolved Hide resolved
docs/source/install.md Show resolved Hide resolved
docs/source/install.md Outdated Show resolved Hide resolved
docs/source/install.md Outdated Show resolved Hide resolved
docs/source/install.md Show resolved Hide resolved
@ewdurbin ewdurbin merged commit a886cf8 into python:main Aug 29, 2022
1 check passed
@ewdurbin
Copy link
Member

ewdurbin commented Aug 29, 2022

Thank you @cegerhardson!

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.

None yet

2 participants