Skip to content

Commit af732ed

Browse files
committed
final draft before release
1 parent 738826e commit af732ed

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Docker/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
2. `/data/pgdata` is mounted in the containers as `/var/lib/postgresql/data/pgdata`. This is where the containers keep their PostgreSQL data. This is also UID and GID 999. For the geocoders, this is easily recreated, either by re-running the scripts or by restoring `geocoder.pgdump` in `/data/gisdata`. But for other applications, you'll want to be careful not to corrupt it with host processes. `/data/pgdata` with just the Oregon goecoder database is currently about 2.7 GB.
2222

2323
### Buidling the database and the images
24-
1. Open a command prompt in this directory and type `./make-images.bash`. It will take a while to run; it is downloading shapefiles, unpacking them and inserting the contents into the database. You can ignore errors and warnings.
25-
2. When the data acquisition is complete you'll see something like
24+
1. Open a terminal in this directory.
25+
2. Set a password for the `postgres` database superuser. Type `export PGPASSWORD="yourpasswordgoeshere"`.
26+
3. Open a command prompt in this directory and type `./make-images.bash`. It will take a while to run; it is downloading shapefiles, unpacking them and inserting the contents into the database. You can ignore errors and warnings.
27+
4. When the data acquisition is complete you'll see something like
2628
```
2729
postgis-geocoder_1 | 2018-01-20 11:10:01.039 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2830
postgis-geocoder_1 | 2018-01-20 11:10:01.039 UTC [1] LOG: listening on IPv6 address "::", port 5432
@@ -31,22 +33,22 @@ postgis-geocoder_1 | 2018-01-20 11:10:01.103 UTC [68] LOG: database system was
3133
postgis-geocoder_1 | 2018-01-20 11:10:01.118 UTC [1] LOG: database system is ready to accept connections
3234
```
3335

34-
When those messages appear, type `CTRL-C` to stop the service.
36+
When those messages appear, type `CTRL-C` to stop the service. Then type `docker-compose -f postgis-geocoder.yml down` to remove the service.
3537

3638
At this point you have
3739

38-
1. `/data/gisdata/geocoder.pgdump` - the geocoder database,
40+
1. `/data/gisdata/geocoder.pgdump` - the geocoder database suitable for `pg_restore`,
3941
2. Downloaded shapefiles in `/data/gisdata/www2.census.gov/`,
4042
3. A PostgreSQL / PostGIS database in `/data/pgdata`,
41-
4. Two Docker images: `docker.io/znmeb/postgis` and `docker.io/znmeb/postgis-geocoder`. The first one is a vanila PostGIS image. It's built by installing the `PostGIS` and `pgRouting` packages in the official Docker PostgreSQL image from <https://hub.docker.com/r/_/postgres/>. Unless you're going to rebuild the database you should use this one.
43+
4. Two Docker images: `docker.io/znmeb/postgis` and `docker.io/znmeb/postgis-geocoder`. The first one is a vanilla PostGIS image. It's built by installing the `PostGIS` and `pgRouting` packages in the official Docker PostgreSQL image from <https://hub.docker.com/r/_/postgres/>. Unless you're going to rebuild the database you should use this one.
4244

4345
The second is the image the scripts used to download the shapefiles and populate the database. Thus it has copies of all the scripts. Both are about 467 MB.
4446

4547
### Running the geocoder
4648
To start the service, type `docker-compose up -d`. `docker-compose` will start the service and you'll see `Creating docker_postgis_1 ... done
4749
`
4850

49-
You'll be able to connect as `postgres` on host `localhost` port `5439` with the password you set above. Note that the port is ***5439*** to avoid conflicts with your host PostgreSQL service.
51+
You'll be able to connect to PostGIS in the container as `postgres` on host `localhost` port `5439` with the password you set above. Note that the port is ***5439*** to avoid conflicts with your host PostgreSQL service, which usually listens on port 5432.
5052

5153
Testing: type
5254

0 commit comments

Comments
 (0)