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

(MAINT) Add root directory for persistence #17

Merged
merged 2 commits into from
Oct 25, 2018
Merged

Conversation

nwolfe
Copy link
Contributor

@nwolfe nwolfe commented Oct 9, 2018

Just to help keep things clean and separated, it's nice to have a root
home for this kind of thing to make it easy to rm-rf, gitignore,
reference, etc.

Just to help keep things clean and separated, it's nice to have a root
home for this kind of thing to make it easy to rm-rf, gitignore,
reference, etc.
@nwolfe
Copy link
Contributor Author

nwolfe commented Oct 9, 2018

This makes it easier for me to play around with these services and compose file.

Haven't considered production impact. Figured I might as well put up a PR for discussion.

@underscorgan
Copy link
Contributor

I was thinking about this recently when I accidentally deleted some WIP trying to reset my server data...I'm definitely 👍 on this, though it will be breaking. I'm not sure the best way to go about that

@lutter
Copy link
Contributor

lutter commented Oct 18, 2018

I am all for this; and I think the sooner we merge it, the less breakage we'll have.

Personally, I'd prefer a name like data or state or volumes over persistence because the latter makes me think it's got code to do with persistence in it.

@nwolfe
Copy link
Contributor Author

nwolfe commented Oct 18, 2018

Yep I agree, volumes is a much better name for this directory.

Turns out there is some prior art in the community around special "migration" containers in your compose file, which I came across in this issue: docker/compose#2033

I haven't dug in, but I think the idea is to have your first container's entrypoint script check for the old state and then migrate it if necessary before running the actual container entrypoint. This could happen either in a special migration container that is depended on by the real service container, or baked into the service container's entrypoint script itself.

Not sure if we want to play around with a migration approach like this just yet though, or even attempt to deal with it at all.

@lutter
Copy link
Contributor

lutter commented Oct 23, 2018

I took the liberty to update this PR by doing a s/persistence/volumes. With that, I think it's good to merge.

@nwolfe nwolfe merged commit 0cca282 into master Oct 25, 2018
@nwolfe nwolfe deleted the MAINT/persistence-dir branch October 25, 2018 18:04
Iristyle pushed a commit that referenced this pull request Apr 9, 2021
(MAINT) Add root directory for persistence
Iristyle pushed a commit that referenced this pull request Apr 9, 2021
(MAINT) Set PGDATA to avoid Windows problem
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.

3 participants