-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
pg-data/ | ||
dump/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
|
||
Creating a postgis composed image | ||
========================================== | ||
|
||
Download and build the images | ||
----------------------------- | ||
|
||
Take a look at `docker-compose.yml` for ports to expose. We are using a custom image | ||
which install the [postgis](http://postgis.net/install/) extensions on top of postgres 9.3. | ||
Check the `postgres` password in `docker-compose.yml`, then build the images and create | ||
the container for the first time: | ||
|
||
``` | ||
$ docker-compose up -d | ||
``` | ||
|
||
Database dump | ||
------------- | ||
|
||
In order to dump database, create a postgis container and link them to database instance: | ||
|
||
``` | ||
$ docker run -it --volume $PWD/dump:/data --link postgis_db_1:postgres --rm mdillon/postgis:9.3 /bin/bash | ||
``` | ||
|
||
Then, once inside a container dump the climgen database: | ||
|
||
``` | ||
$ cd /data/ | ||
$ export PGPASSWORD="mysecretpassword" | ||
$ pg_dump --username=postgres -h postgres -d postgres | gzip --best > postgres.sql.gz | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ nginx: | |
volumes_from: | ||
- php | ||
ports: | ||
- "10080:10080" | ||
- "80" | ||
links: | ||
- php | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters