Git Product home page Git Product logo

lipas's Introduction

LIPAS

prod | dev | ci | issues | dev-tasks | use-cases (finnish) | ideas (finnish)

LIPAS is a nationwide, public GIS service of Finnish sport facilities. More information here.

Tech stack

Architecture diagram

Webapp

Webapp is written in Clojure(script).

Backend

Webapp backend is a simple HTTP(s) service with endpoints for different tasks. Some endpoints require authentication. Authentication is implemented using HTTP-basic authentication and signed JWT-tokens.

Frontend

Postgis database

Spatial PostGIS for master data storage.

Nginx

Web facing Nginx reverse proxy, ssl-termination.

Mapproxy

Mapproxy basemap proxy and cache.

ELK-stack

ELK (ElasticSearch, Logstash, Kibana) is used to provide webapp search funtionalities as well as data and monitoring information.

Old Lipas

All data flows also to old Lipas which exposes the data through Geoserver and legacy REST-Api.

REST-API

See Api-documentation here.

GeoServer

Geoserver publishing spatial data. See available layers here.

Dev-env setup

# Create env-file from template
cp .env.sample.sh .env.sh

# Fill in secrets
$EDITOR .env.sh

# Run setup script
./setup-dev.sh

Extra

Add following to your hosts file to use same hostnames in both docker and host while developing.

# Lipas dev
127.0.0.1       postgres
127.0.0.1       backend-dev
127.0.0.1       mapproxy
127.0.0.1       elasticsearch
127.0.0.1       kibana
127.0.0.1       logstash
127.0.0.1       proxy

Production build

Backend

docker compose run backend-build

See certs/README.md.

Frontend

docker compose run frontend-npm-deps
docker compose run frontend-build

Apple Silicon considerations

Open Source Routing Machine currently has not an arm64 build. It is much faster than using the x86 image so consider building it yourself:

git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
docker build -t osrm-local --platform arm64 -f docker/Dockerfile .

Then you need to replace every usage of osrm/osrm-backend image with osrm-local, for example:

sed -i '.backup' s|osrm/osrm-backend|osrm-local|g docker-compose.yml
sed -i '.backup' s|osrm/osrm-backend|osrm-local|g osrm/README.md

Then see osrm/README.md to build the osrm files.

See Project-OSRM/osrm-backend#6133

Backups

# Dump
docker exec -i lipas-postgres-1 pg_dump -U lipas -Fc > lipas.backup
# Restore
docker exec -i lipas-postgres-1 pg_restore -Fc < lipas.backup
# Rebuild ES index
docker compose run --rm backend-index-search

lipas's People

Contributors

dependabot[bot] avatar deraen avatar t-my avatar vharmain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lipas's Issues

Implementation of map for GIS

Got here from your CLOJUTRE 2019 talk. Was particularly interested as I feel I'm in a position where you were at - just beginning learn Clojure and wanting to use it for work, except in my case it is for my (Final Year) Capstone project. And it happens to also be GIS related.

Anyway, isit just me or did you effectively implement your own clojure mapping library in this? I was thinking you would use something like Leaflet.js . Am trying to figure out how your web app works

Data structure

Tried to figure out what information is being gathered from each type of sports place but I cannot find a corresponding field name for each piece of information available via browser version of Lipas?

Example case.
Information about Petsmo jääkenttä via browser version:
https://www.lipas.fi/liikuntapaikat/602467

Information about the same sports place via JSON API:
http://lipas.cc.jyu.fi/api/sports-places/602467
and
http://lipas.cc.jyu.fi/api/sports-place-types/1520

I am under the expression that I should find all used fields related to the Petsmo jääkenttä from the two above listed URLs. Yet I cannot find any field into which a user could input the swedish name of the sports place or the information about whether the sports place is at use or not. Still this information is available from the browser version (Nimi ruotsiksi, Liikuntapaikan tila).

Am I missing something or isn't the content of the JSON API up-to-date?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.