Skip to content

Commit

Permalink
Merge pull request #66 from stevo01/master
Browse files Browse the repository at this point in the history
pull request solves issues #63 #64 #65
  • Loading branch information
Overv authored Sep 26, 2019
2 parents 80586af + bea77eb commit a2eceb6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ RUN cmake .. \
&& make -j $(nproc)
USER root
RUN make install
RUN mkdir /nodes \
&& chown renderer:renderer /nodes
USER renderer

# Install and test Mapnik
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ docker run \
run
```

### CACHE

The import and tile serving processes use 800 MB RAM cache by default, but this number can be changed by option -C. For example:
```
docker run \
-p 80:80 \
-e "OSM2PGSQL_EXTRA_ARGS=-C 4096" \
-v openstreetmap-data:/var/lib/postgresql/10/main \
-d overv/openstreetmap-tile-server \
run
```

### AUTOVACUUM

The database use the autovacuum feature by default. This behavior can be changed with `AUTOVACUUM` environment variable. For example:
Expand Down
2 changes: 1 addition & 1 deletion openstreetmap-tiles-update-expire
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OSM2PGSQL_BIN=osm2pgsql
TRIM_BIN=/home/$ACCOUNT/src/regional/trim_osc.py

DBNAME=gis
OSM2PGSQL_OPTIONS="-d $DBNAME -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua -C 2048 --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style"
OSM2PGSQL_OPTIONS="-d $DBNAME -G --hstore ${OSM2PGSQL_EXTRA_ARGS} --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style"

#------------------------------------------------------------------------------
# When using trim_osc.py we can define either a bounding box (such as this
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [ "$1" = "import" ]; then
fi

# Import data
sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua -C 2048 --number-processes ${THREADS:-4} ${OSM2PGSQL_EXTRA_ARGS} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf
sudo -u renderer osm2pgsql -d gis --create --slim -G --hstore --tag-transform-script /home/renderer/src/openstreetmap-carto/openstreetmap-carto.lua --number-processes ${THREADS:-4} ${OSM2PGSQL_EXTRA_ARGS} -S /home/renderer/src/openstreetmap-carto/openstreetmap-carto.style /data.osm.pbf

# Create indexes
sudo -u postgres psql -d gis -f indexes.sql
Expand Down

0 comments on commit a2eceb6

Please sign in to comment.