Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

Postgres and redis volumes should be localised to app #37

Closed
deanfields opened this issue Apr 18, 2018 · 1 comment
Closed

Postgres and redis volumes should be localised to app #37

deanfields opened this issue Apr 18, 2018 · 1 comment

Comments

@deanfields
Copy link

deanfields commented Apr 18, 2018

in the docker-compose file volumes are set like this:

- 'postgres:/var/lib/postgresql/data'

But I think they should be set like this:

- './postgres:/var/lib/postgresql/data'

This localizes the folder to the project itself, and it should be ignored in the git file

@nickjj
Copy link
Owner

nickjj commented Apr 18, 2018

I think it's best to use named volumes for these. Typically these aren't files you would interact with on a regular basis, so by using named volumes, you just let Docker manage them without worrying about where they live on your file system.

The volumes will be automatically name spaced by the project's name. You can verify that by running docker volume ls.

@nickjj nickjj closed this as completed Apr 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants