hashworks pushed to branch main at Arch Linux / Packaging / Packages / nominatim
Commits:
3fa5c7af by Justin Kromlinger at 2023-12-14T13:36:35+01:00
Add updates service and timer
- - - - -
5 changed files:
- PKGBUILD
- nginx-php.conf
- + nominatim-updates.service
- + nominatim-updates.timer
- nominatim.install
Changes:
=====================================
PKGBUILD
=====================================
@@ -69,6 +69,8 @@ source=(
"${pkgname}.tmpfiles"
"nominatim.service"
"nominatim.socket"
+ "nominatim-updates.service"
+ "nominatim-updates.timer"
"nginx-python.conf"
"apache-php.conf"
"nginx-php.conf"
@@ -81,11 +83,13 @@
sha256sums=('3e05e57bdbeed519e3ffe3716ddb86b86413eec4296bb4f69580825fdcc17eb5'
'fe66393aaf561749255cebf4c61d13a8425e326b8ce50409d88c4035165de049'
'7f71b5217cbe0713fa5f8baa138348c9cd49f42c2b6025c059076042e0c04c6d'
'964e7d8bde044dee0b69002959bcdd5d469f83d85f166ddd5fb178954bc84999'
- '0bee153f02a063abff72115cd7e606f62a73bd2b810f7adea302c9b0b8ad7c41'
+ '11e4d595b8f2117f70001c56e2cb6793cd78e910b090b88670e0894e6754ca67'
'14abede6378e8afba22b1152bff290ffedbb74400c65184f37fc5531050be5ff'
+ '7153470e5d9d7b0dbe573f7b87b0034dda89ca9ad502373dd53ce4e9ab1a15b8'
+ '4f4c14000d2dd56271377a543dbebaf547fc543a9f610570a740e03c196b1947'
'5131a42f62d83bd68089769badd29bdd07e08263a336212d7f337e3f5b273fb0'
'3c4d5fbb1299aff5d4efa855c8b278f2e19c47104982f3488c2c545a40f75ac8'
- 'e8c120fbd07d08ab5fa12fbb7a122787f0e94175d577dc8974a7b851978a4e24'
+ '2f8e550a8bc89de96d29bc61c96cc6cc6007a516f72fc6f125ba30e779a7e64a'
'37c4b17463f8317d39bb741b07bbb693afc0bbf584eec590f89b849542b98b7d'
'c2d5391160704bc636fde73c0e92346529ae1698f1cc909a8341271e0e4967d4'
'ed051533ad83fb93e458e31d4e116ad9717ff8d4edc7af0dec2b2a3bb61c7172'
@@ -136,9 +140,11 @@ package() {
rm "${pkgdir}/usr/share/nominatim/country_osm_grid.sql.gz" # link to
/startdir, drop it
install -Dm644
"${srcdir}/Nominatim-${pkgver}/data/country_osm_grid.sql.gz" -t
"${pkgdir}/usr/share/nominatim/"
- # install python gunicorn service files
+ # install python gunicorn and update service files
install -Dm644 "${srcdir}/nominatim.service" -t
"${pkgdir}/usr/lib/systemd/system/"
install -Dm644 "${srcdir}/nominatim.socket" -t
"${pkgdir}/usr/lib/systemd/system/"
+ install -Dm644 "${srcdir}/nominatim-updates.service" -t
"${pkgdir}/usr/lib/systemd/system/"
+ install -Dm644 "${srcdir}/nominatim-updates.timer" -t
"${pkgdir}/usr/lib/systemd/system/"
# install apache, nginx and PHP example configs
install -Dm644 "${srcdir}/nginx-python.conf" -t
"${pkgdir}/usr/share/doc/$pkgname/examples/"
=====================================
nginx-php.conf
=====================================
@@ -3,7 +3,7 @@ server {
listen 80;
listen [::]:80;
- root /usr/lib/nominatim/lib-php/website/;
+ root /var/lib/nominatim/website/; # Generated by inital import or
`nominatim refresh --website`
index search.php index.html;
location / {
try_files $uri $uri/ @php;
=====================================
nominatim-updates.service
=====================================
@@ -0,0 +1,14 @@
+[Unit]
+Description=Single updates of Nominatim
+
+[Service]
+WorkingDirectory=/var/lib/nominatim
+ExecStart=/usr/bin/nominatim replication --once
+StandardOutput=append:/var/log/nominatim/updates.log
+StandardError=append:/var/log/nominatim/updates.error.log
+User=nominatim
+Group=nominatim
+Type=simple
+
+[Install]
+WantedBy=multi-user.target
=====================================
nominatim-updates.timer
=====================================
@@ -0,0 +1,10 @@
+[Unit]
+Description=Timer to start updates of Nominatim
+
+[Timer]
+OnActiveSec=2
+OnUnitActiveSec=1min
+Unit=nominatim-updates.service
+
+[Install]
+WantedBy=multi-user.target
=====================================
nominatim.install
=====================================
@@ -11,6 +11,9 @@ post_install() {
Don't forget to remove superuser permissions from the nominatim PostgreSQL
user after installation is complete.
+ After the import one should run `nominatim replication --init` and start
and enable the update timer:
+ `systemctl enable --now nominatim-updates.timer`
+
To use the python frontend with gunicorn and Falcon, start and enable the
nominatim socket and service:
`systemctl enable --now nominatim.socket nominatim.service`
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/nominatim/-/commit/3fa5c7af92eed2a56b7ae7441bea76baec4da809
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/nominatim/-/commit/3fa5c7af92eed2a56b7ae7441bea76baec4da809
You're receiving this email because of your account on gitlab.archlinux.org.