Skip to content

Commit 0afd698

Browse files
Merge pull request #376 from rustprooflabs/reduced-conns-test
Updates for latest osm2pgsql - reducing connections to Postgres
2 parents f876b72 + 3224da2 commit 0afd698

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ FROM postgis/postgis:16-3.4
33
LABEL maintainer="PgOSM Flex - https://github.com/rustprooflabs/pgosm-flex"
44

55
ARG OSM2PGSQL_BRANCH=master
6+
ARG OSM2PGSQL_REPO=https://github.com/osm2pgsql-dev/osm2pgsql.git
7+
68

79
RUN apt-get update \
810
# Removed upgrade per https://github.com/rustprooflabs/pgosm-flex/issues/322
@@ -34,7 +36,7 @@ RUN luarocks install luasql-postgres PGSQL_INCDIR=/usr/include/postgresql/
3436

3537

3638
WORKDIR /tmp
37-
RUN git clone --depth 1 --branch $OSM2PGSQL_BRANCH https://github.com/openstreetmap/osm2pgsql.git \
39+
RUN git clone --depth 1 --branch $OSM2PGSQL_BRANCH $OSM2PGSQL_REPO \
3840
&& mkdir osm2pgsql/build \
3941
&& cd osm2pgsql/build \
4042
&& cmake .. -D USE_PROJ_LIB=6 \

docker/pgosm_flex.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ def run_replication_update(skip_nested, flex_path):
268268
osm2pgsql-replication update -d $PGOSM_CONN \
269269
-- \
270270
--output=flex --style=./run.lua \
271-
--slim \
272-
-d $PGOSM_CONN
273-
"""
271+
--slim
272+
"""
273+
274274
update_cmd = update_cmd.replace('-d $PGOSM_CONN', f'-d {conn_string}')
275275
returncode = helpers.run_command_via_subprocess(cmd=update_cmd.split(),
276276
cwd=flex_path,
@@ -422,7 +422,7 @@ def run_osm2pgsql(osm2pgsql_command, flex_path, debug):
422422
"""
423423
logger = logging.getLogger('pgosm-flex')
424424
logger.info('Running osm2pgsql')
425-
425+
426426
returncode = helpers.run_command_via_subprocess(cmd=osm2pgsql_command.split(),
427427
cwd=flex_path,
428428
print=True)

0 commit comments

Comments
 (0)