We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
docker now no longer cleans up volumes that aren't referenced so the docker data container pattern is obsolete.
https://docs.docker.com/engine/userguide/containers/dockervolumes/
Data volumes persist even if the container itself is deleted.
So you can remove the data entry in compose and replace the postgres entry with:
data
postgres: restart: always image: postgres:latest ports: - "5432:5432" volumes: - pgdata:/var/lib/postgresql/data/
This uses a named volume (so you can find it easily).
Should probably give redis a volume to so it's persisted:
redis: restart: always image: redis:latest ports: - "6379:6379" volumes: - redisdata:/data
The text was updated successfully, but these errors were encountered:
Thanks! Updating the code and the blog post now!
Sorry, something went wrong.
No branches or pull requests
docker now no longer cleans up volumes that aren't referenced so the docker data container pattern is obsolete.
https://docs.docker.com/engine/userguide/containers/dockervolumes/
So you can remove the
data
entry in compose and replace the postgres entry with:This uses a named volume (so you can find it easily).
Should probably give redis a volume to so it's persisted:
The text was updated successfully, but these errors were encountered: