Custom manage.py Entry Point Script#265
Merged
Merged
Conversation
MarkKoz
reviewed
Sep 28, 2019
MarkKoz
approved these changes
Sep 28, 2019
lemonsaurus
approved these changes
Sep 29, 2019
Contributor
lemonsaurus
left a comment
There was a problem hiding this comment.
This looks excellent, my only comments are what @MarkKoz already caught and you fixed already.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've done up a custom
manage.pyto suit a few custom purposes and to help aid a simplified development setup.The SiteManager will handle preparing the server for both development and production environments, ensuring appropriate preparations are only run on the correct environments.
Development Environment
Preparation steps
admin:adminas default.SUPER_USERNAMESUPER_PASSWORDmigratecollectstaticFixes
migrateandcollectstaticrunning twice on first launch due to development web serverStatReloader.Production Environment
Preparation steps
migratecollectstaticDockerfile & Compose
manage.pyis the entry point now for Dockerfile as almost any Django command would need to be run through it.botdocker will connect to the same project stack, so will use the internal docker domainwebto reference the container on the network. Aliases have been added for relevant subdomains and the new domain aliases added to ALLOWED_HOSTS when in debug mode.File Changes
Dockerfileandlocal.Dockerfilewere no longer distinct, so both environments use the one file.docker/appsdirectory is now thedockerdirectory.