Validation tool for OSM, currently working on public transport relations in Zagreb, Croatia

0ec0cfa Start work on autotrolej realtime data

a month ago

2ef6e44 Fix deprecation warnings

6 months ago


Triglav logo

A web for helping out with editing OSM.

Logo designed by Nela Dunato.

Check it out here: https://triglav.bezdomni.net/


  • Elixir 1.13 with Erlang/OTP 24
  • PostgreSQL 14 with PostGIS 3.2
  • Osmosis 0.48.3

May work with other versions, but these are tested.

#Quick start

# Define where the database is located
export DATABASE_URL=ecto://user:pass@localhost:5432/triglav_dev

# Install elixir dependencies
mix deps.get

# Install node dependancies
npm install --prefix assets

# Initialize the database
mix ecto.create
mix ecto.migrate

# Import GTFS data from zet.hr
mix triglav.import_zet

# Import OSM data for Croatia from Geofabrik
mix triglav.osmosis_init

# Start server
mix phx.server

The web is hopefully available at http://localhost:4000/



#Nginx config

upstream triglav {
  server max_fails=5 fail_timeout=60s;

server {
    listen 80;
    server_name triglav.bezdomni.net;
    return 301 https://$host$request_uri;

server {
    listen 443;

    server_name triglav.bezdomni.net;

    access_log /var/log/nginx/triglav.bezdomni.net.access.log;
    error_log /var/log/nginx/triglav.bezdomni.net.error.log;

    ssl_certificate     /etc/letsencrypt/live/bezdomni.net/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/bezdomni.net/privkey.pem;
    include             /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam         /etc/letsencrypt/ssl-dhparams.pem;

    location / {
      allow all;

      # Proxy Headers
      proxy_http_version 1.1;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-Cluster-Client-Ip $remote_addr;

      # The Important Websocket Bits!
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

      proxy_pass http://triglav;

#Systemd config


Description=Triglav daemon

ExecStart=/home/ihabunek/projects/triglav/prod/rel/triglav/bin/triglav start
ExecReload=/home/ihabunek/projects/triglav/prod/rel/triglav/bin/triglav restart
ExecStop=/home/ihabunek/projects/triglav/prod/rel/triglav/bin/triglav stop


Enable service (only required once):

sudo systemctl enable triglav.service

Read logs:

journalctl -u service-name.service