Revert "switch to using replication_url"

This reverts commit 89d238b2d0.
This commit is contained in:
Greg 2022-02-17 22:44:05 +00:00
parent b77c777cb0
commit 99dc08768e
3 changed files with 5 additions and 13 deletions

View File

@ -29,8 +29,6 @@ If your import is an extract of the planet and has polygonal bounds associated w
``` ```
docker run \ docker run \
-e UPDATES=enabled \ -e UPDATES=enabled \
-e REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/ \
-e MAX_INTERVAL_SECONDS=60 \
-v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \ -v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \
-v /absolute/path/to/luxembourg.poly:/data.poly \ -v /absolute/path/to/luxembourg.poly:/data.poly \
-v openstreetmap-data:/var/lib/postgresql/12/main \ -v openstreetmap-data:/var/lib/postgresql/12/main \
@ -115,8 +113,6 @@ Given that you've set up your import as described in the *Automatic updates* sec
``` ```
docker run \ docker run \
-p 8080:80 \ -p 8080:80 \
-e REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/ \
-e MAX_INTERVAL_SECONDS=60 \
-e UPDATES=enabled \ -e UPDATES=enabled \
-v openstreetmap-data:/var/lib/postgresql/12/main \ -v openstreetmap-data:/var/lib/postgresql/12/main \
-v openstreetmap-rendered-tiles:/var/lib/mod_tile \ -v openstreetmap-rendered-tiles:/var/lib/mod_tile \

11
openstreetmap-tiles-update-expire Executable file → Normal file
View File

@ -113,15 +113,12 @@ if [ $# -eq 1 ] ; then
mkdir -p $WORKOSM_DIR mkdir -p $WORKOSM_DIR
$OSMOSIS_BIN -v 5 --read-replication-interval-init workingDirectory=$WORKOSM_DIR 1>&2 2> "$OSMOSISLOG" $OSMOSIS_BIN -v 5 --read-replication-interval-init workingDirectory=$WORKOSM_DIR 1>&2 2> "$OSMOSISLOG"
init_seq=$(pyosmium-get-changes --server $REPLICATION_URL -D $1) init_seq=$(pyosmium-get-changes --server https://planet.openstreetmap.org/replication/minute/ -D $1)
url_dynamicPart=$(printf %09d $init_seq | sed 's_\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)_\1/\2/\3_') url_dynamicPart=$(printf %09d $init_seq | sed 's_\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)_\1/\2/\3_')
wget $REPLICATION_URL/$url_dynamicPart.state.txt -O $WORKOSM_DIR/state.txt wget https://planet.openstreetmap.org/replication/minute/$url_dynamicPart.state.txt -O $WORKOSM_DIR/state.txt
cat > /var/lib/mod_tile/.osmosis/configuration.txt <<- EOM
baseUrl=$REPLICATION_URL
maxInterval=$MAX_INTERVAL_SECONDS
EOM
mv $WORKOSM_DIR/configuration.txt $WORKOSM_DIR/configuration_orig.txt
sed "s!baseUrl=http://planet.openstreetmap.org/replication/minute!baseUrl=https://planet.openstreetmap.org/replication/minute!" $WORKOSM_DIR/configuration_orig.txt > $WORKOSM_DIR/configuration.txt
else else
# make sure the lockfile is removed when we exit and then claim it # make sure the lockfile is removed when we exit and then claim it

3
run.sh
View File

@ -85,8 +85,7 @@ if [ "$1" = "import" ]; then
REPLICATION_TIMESTAMP=$(cat /var/lib/mod_tile/replication_timestamp.txt) REPLICATION_TIMESTAMP=$(cat /var/lib/mod_tile/replication_timestamp.txt)
# initial setup of osmosis workspace (for consecutive updates) # initial setup of osmosis workspace (for consecutive updates)
sudo -E -u renderer openstreetmap-tiles-update-expire $REPLICATION_TIMESTAMP sudo -u renderer openstreetmap-tiles-update-expire $REPLICATION_TIMESTAMP
fi fi
# copy polygon file if available # copy polygon file if available