https://github.com/codeformuenster/muenster-dashboard
Eine "Stadtviertel-App", zeigt Infos aus Deiner Umgebung an, aus Open Data Datensätzen der Stadt Münster.
https://github.com/codeformuenster/muenster-dashboard
elasticsearch open-data react
Last synced: 6 months ago
JSON representation
Eine "Stadtviertel-App", zeigt Infos aus Deiner Umgebung an, aus Open Data Datensätzen der Stadt Münster.
- Host: GitHub
- URL: https://github.com/codeformuenster/muenster-dashboard
- Owner: codeformuenster
- License: apache-2.0
- Created: 2017-11-10T11:27:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T01:32:55.000Z (over 3 years ago)
- Last Synced: 2024-06-11T17:25:27.856Z (about 2 years ago)
- Topics: elasticsearch, open-data, react
- Language: JavaScript
- Homepage: https://mein-ms.de/
- Size: 4.47 MB
- Stars: 7
- Watchers: 7
- Forks: 4
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fcodeformuenster%2Fmuenster-dashboard?ref=badge_shield)
## Run development environment locally
```bash
export COMPOSE_PROJECT_NAME="muenster-dashboard"
export ELASTICSEARCH_URL_PREFIX="http://localhost:9200/mein-ms2-"
export BUILD="--build"
sudo --preserve-env docker-compose up $BUILD
```
If you want to start React in developer mode open another terminal:
```bash
sudo docker container stop muenster-dashboard_dashboard_1
export REACT_APP_ELASTICSEARCH_URL_PREFIX="http://localhost:9200/mein-ms2-"
npm start
```
## Debugging
If "npm start" fails because of this error:
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/thomas/git/familien-dashboard/public'
Then you should try:
```bash
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```
## Debug kibana index content
* Show indexes: https://elasticsearch.codeformuenster.org/mein-ms-places/_cat/indices
* Show content of mein-ms-places index: https://elasticsearch.codeformuenster.org/mein-ms-places/_search
* Show only events: https://elasticsearch.codeformuenster.org/mein-ms-places/_search?q=type:event
For offline debugging, exchange `elasticsearch.codeformuenster.org` with `localhost:9200`.
### Delete and recreate an index
If you need to delete an index:
curl -XDELETE localhost:9200/places
Before importing it, don't forget to run the index creation script, otherwise the locations will not be recognized by Elasticsearch.
node create_indexes.js
careful, this ^ also deletes indexes. uncomment the indexes you dont want to recreate.
## Data import
For importing the data open a new terminal:
If you don't provide a mapquest key, *no events will be imported*.
Get a mapquest key here (registration is quick and easy): https://developer.mapquest.com/user/me/apps
```bash
export COMPOSE_PROJECT_NAME="muenster-dashboard"
export ELASTICSEARCH_URL_PREFIX="http://elasticsearch:9200/mein-ms2-"
export BUILD="--build"
export MAPQUEST_KEY=""
cd import-scripts
sudo --preserve-env ./import.sh
```
Read more about importing mein-ms data in [import-scripts/README.md](import-scripts/README.md)