check directories one by one and not depend only on config.js#6
Merged
tianon merged 1 commit intodocker-library:masterfrom Apr 6, 2015
soupdiver:separate_init_checks
Merged
check directories one by one and not depend only on config.js#6tianon merged 1 commit intodocker-library:masterfrom soupdiver:separate_init_checks
tianon merged 1 commit intodocker-library:masterfrom
soupdiver:separate_init_checks
Conversation
Member
|
LGTM |
Member
|
Seems sane. 👍 LGTM |
tianon
added a commit
that referenced
this pull request
Apr 6, 2015
check directories one by one and not depend only on config.js
Member
|
Do we have any documentation we can point to upstream to note that this is the full list of possible directories in |
Contributor
Author
|
I just picked the directories which are present there: https://github.com/TryGhost/Ghost/tree/master/content |
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.
As mentioned in #5 this change introduces a less radical init process checking and gives you the opportunity to inject your own
config.jsfrom a data-only container, which should be responsible for holding the state. Otherwise it would not be possible to upgrade the image the container is running on without losing your current state.This solution still has problems because of the way the container start is handled in general.
The
config.example.jsdoes not include thepathsattribute for the production environment and so it is not "fixed" in the way the development environment is with thesedcommand indocker-entrypoint.shThat's why the container start fails when giving
NODE_ENV=production.If you put a correct
config.jsin a container from which you get the volumes before the first start, the container crashes because the subfolders of theGHOST_CONTENTdir were not initialised. This is because aconfig.jswas found and the init phase is totally skipped.This is fixed in this PR.
Anyway you have to pay attention to also "fix" the paths for other environments manually because the automatism via
sedis only run when als theconfig.jsis initialsed automatically which again leads to the production environment problem.So that's all a bit hacky because the original
config.example.jsis incomplete and needs manual adjustment to work in production.