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 persistance to Postresql container #887

Merged
merged 6 commits into from
Apr 8, 2017
Merged

add persistance to Postresql container #887

merged 6 commits into from
Apr 8, 2017

Conversation

valentin2105
Copy link
Contributor

Create a volume for Postgres datas. Because if you kill all containers without this volume, all users are losts.

@Wonderfall
Copy link
Contributor

Same goes for redis :

  volumes:
    - ./redis:/data

@Gargron
Copy link
Member

Gargron commented Apr 5, 2017

Does docker-compose automatically create these folders on the host, or do you have to create them yourself? Or does docker-compose complain if they're not there?

For the record when this option is not specified, the contains still use volumes, they're just anonymous volumes that are hard to find later.

@Wonderfall
Copy link
Contributor

@Gargron docker-compose is smart and does all the magic for you. :)

@Gargron
Copy link
Member

Gargron commented Apr 5, 2017

In that case please add @Wonderfall's suggested addition and I will merge

@valentin2105
Copy link
Contributor Author

I think it's a better idea to specify the path for volumes, for easy backup for example.

@krainboltgreene
Copy link
Member

This will break on local development in a vm (aka mac), since they wont have the right permissions.

@valentin2105
Copy link
Contributor Author

So why not create a specific dev compose file ?

@valentin2105 valentin2105 reopened this Apr 8, 2017
@Gargron Gargron merged commit 9f9f4b2 into mastodon:master Apr 8, 2017
@Gargron
Copy link
Member

Gargron commented Apr 8, 2017

While this is a good change for new installations, I have realized (the hard way from an admin trying this out) that this will make docker-compose break previous installations during update.

I am reverting this until we can figure out how to not brick people's existing configurations.

@jemus42
Copy link
Contributor

jemus42 commented Apr 10, 2017

Is @Wonderfall's redis addition really necessary? Because I'm one of those admins who lost their db because of a docker-compose down, but after I found the old postgres volume in var/lib/docker/volumes and mounted that for postgres, my database was intact again.

@Wonderfall
Copy link
Contributor

@jemus42 /data contains the dump.rdb file.

Nyoho referenced this pull request in Nyoho/mathtodon Apr 25, 2017
add persistance to Postresql container
abcang added a commit to pixiv/mastodon that referenced this pull request Mar 1, 2018
…d_characters

Ignore exception of invalid characters
hannahwhy pushed a commit to hannahwhy/mastodon that referenced this pull request Jan 16, 2019
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.

5 participants