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.
Webapp is written in Clojure(script).
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.
- re-frame Single Page Application
- material-ui components
Spatial PostGIS for master data storage.
Web facing Nginx reverse proxy, ssl-termination.
Mapproxy basemap proxy and cache.
ELK (ElasticSearch, Logstash, Kibana) is used to provide webapp search funtionalities as well as data and monitoring information.
All data flows also to old Lipas which exposes the data through Geoserver and legacy REST-Api.
See Api-documentation here.
Geoserver publishing spatial data. See available layers here.
# Create env-file from template
cp .env.sample.sh .env.sh
# Fill in secrets
$EDITOR .env.sh
# 1. ALTERNATIVE: Run setup script
# This runs the clj app in a container also
./setup-dev.sh
# 2. ALTERNATIVE:
# Start proxy-local container
bb up
cd webapp
# Start repl
lein repl
user=> (reset)
# Start cljs build
npm i
npm run watch
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
docker compose run backend-build
# or
lein uberjar
See certs/README.md.
docker compose run frontend-npm-deps
docker compose run frontend-build
# or without Docker
lein run -m shadow.cljs.devtools.cli release app
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
# 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