From: | Joseph Ferguson <joe(at)infosiftr(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Postgres-Docker Mailing List <pgsql-pkg-docker(at)postgresql(dot)org> |
Subject: | Re: Volumes vs. UFS storage |
Date: | 2014-07-14 19:32:12 |
Message-ID: | CAF3-kPHFNGN0C+wWE18XXehh4gB=cwrq_zf6vvsPC70Jr8MOTA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-pkg-docker |
On Mon, Jul 14, 2014 at 1:02 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> Tianon, Yosif:
>
> Another development vs. production question we have is configuring the
> main package to have a volume "option". For production installations,
> users are going to want to put $PGDATA on a volume linked to a specific
> local drive location, but users running automated tests will not want to
> (as well as users who don't care about DB performance).
>
> Thoughts on this?
The volume is exposed in the Dockerfile, but users don't have to
provide a --volumes-from or -v bind mount to make it run. See the
docs for more info about volumes[1]. If they run it for testing
without one of these options it will just be using storage local to
that container and will be deleted when the container is deleted.
Example automated test:
docker run --name my-test-pgsql -d postgres
docker run --link my-test-pgsql:postgres -it my-testing-image
docker stop my-test-pqsql
docker rm my-test-pgsql
The container including the $PGDATA directory will be deleted on docker rm.
Production example:
docker run --name prod-pgsql1 -d -v
/host/path/to/raid:/var/lib/postgresql/data postgres
docker run --name prod-app1 --link prod-pgsql1:postgres -d my-app
[1]: https://docs.docker.com/userguide/dockervolumes/
- Joe Ferguson :: joe(at)infosiftr(dot)com
InfoSiftr :: Vice President of Programming
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2014-07-14 23:19:26 | Branches and versions |
Previous Message | Tianon Gravi | 2014-07-14 19:04:00 | Re: Packages instead of Source |