@@ -15,11 +15,12 @@ The standalone `geocodingapi` binary can run on any 64-bit linux with recent lib
1515
1616``` bash
1717api install zip
18- useradd --user-group --create-home --system --skel /dev/null --home-dir /app geocoding
19- curl https://github.com/open-meteo/geocoding-api/releases/download/0.0.1/geocodingapi-ubuntu-20.04.gz | gunzip > /app/geocodingapi
20- chmod +x /app/geocodingapi
21- mkdir /app/data
22- cd /app/data
18+
19+ wget https://github.com/open-meteo/geocoding-api/releases/download/0.0.5/geocoding-api_0.0.5_focal_amd64.deb
20+ dpkg -i geocoding-api_0.0.4_focal_amd64.deb
21+
22+ mkdir /var/lib/geocoding-api/data
23+ cd /var/lib/geocoding-api/data
2324mkdir zip
2425curl http://download.geonames.org/export/dump/allCountries.zip -o allCountries.zip
2526curl http://download.geonames.org/export/dump/alternateNames.zip -o alternateNames.zip
@@ -28,29 +29,11 @@ unzip allCountries.zip
2829unzip alternateNames.zip
2930cd zip; unzip allCountries.zip; cd ..
3031
31- systemctl enable geocoding8080
32- systemctl start geocoding8080
33- systemctl status geocoding8080
32+ systemctl enable geocoding-api.service
33+ systemctl start geocoding-api.service
34+ systemctl status geocoding-api.service
3435```
3536
36- - Create systemd service unit at ` /etc/systemd/system/geocoding8080.service `
37- ``
38- [ Unit]
39- Description = Run geocoding API on port 8080
40-
41- [ Service]
42- Type=simple
43- User=geocoding
44- Group=geocoding
45- WorkingDirectory=/app
46- ExecStart=/app/geocodingapi serve -b 127.0.0.1:8080 --env production
47- Restart=always
48- RestartSec=1
49-
50- [ Install]
51- WantedBy = multi-user.target
52- ``
53-
5437Additionally, nginx proxy should be used
5538
5639## Terms & Privacy
0 commit comments