From 22204050f2607d34160068a5bc953c6629d2bea8 Mon Sep 17 00:00:00 2001 From: Robbe Haesendonck Date: Tue, 26 Sep 2023 12:59:14 +0200 Subject: [PATCH] Added new psql user for importing the data --- .github/workflows/ci-tests.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 767b5bfc..ea0efa47 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -305,10 +305,24 @@ jobs: run: nominatim admin --collect-os-info working-directory: /home/nominatim/nominatim-project - - name: Import + - name: Prepare Database run: | nominatim import --prepare-database - nominatim import --no-superuser --osm-file ../test.pbf + working-directory: /home/nominatim/nominatim-project + + - name: Create import user + run: | + sudo -u postgres createuser -S osm-import -P osm-import + working-directory: /home/nominatim/nominatim-project + + - name: Grant import user rights + run: | + sudo -u postgres psql -c "GRANT INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO \"osm-import\";" + working-directory: /home/nominatim/nominatim-project + + - name: Run import + run: | + NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim;user=osm-import;password=osm-import" nominatim import --continue import-from-file --osm-file ../test.pbf working-directory: /home/nominatim/nominatim-project - name: Import special phrases -- 2.39.5