A student project created by Yamsha75, maciejczaja, Tamasa94, Glifu, Nieminik
First, set POSTGRESS_PASSWORD environment variable to a desired value (it can be any non-empty string).
on Unix systems: export POSTGRESS_PASSWORD=<password>
on Windows: set POSTGRESS_PASSWORD=<password>
Then build all the required images.
docker-compose build
It's time to start up the composition.
docker-compose up -d
The last thing to do is to run the get_segments.sh from the router container.
docker exec -it can_router_1 /bin/sh -c "chmod +x /app/get_segments.sh && /app/get_segments.sh"
- Java Runtime Environment, version 7 or newer
- Python 3.9.0
- NodeJS
-
Download the newest archive from releases and unpack everything
-
Download the required map segments for brouter app:
- on Unix systems: execute
brouter/misc/scripts/get_segments.sh
- on Windows 10: cd into
brouter/misc/scripts/
and executeget_segments.cmd
- on older Windows releases: follow instructions in this document and place the files in
brouter/misc/segments4
-
For backend and scraper you can either install required packages globally on your system or use a virtual environment of your choice. We advise using pipenv
- using pip (globally): execute
pip install -r requirements.txt
in bothflask-app
andscraper
directories - using pipenv (virtual environment): execute
pip install pipenv
globally, then executepipenv install
in bothflask-app
andscraper
directories
- using pip (globally): execute
-
For frontend, download and install NodeJS from an executable or from your Linux package manager. Then in
can-frontend
directory executenpm install
-
For database, you can either use a PostgreSQL database of your choice or a single-file-based SQLite. By default, both scraper and backend use SQLite with a database file
dev.db
placed in project root directory. For PostgreSQL, all you need to do is setDB_CONNECTION_URI
environment variable - before running both backend and scraper - using this template:postgresql://<db_username>:<db_password>@<db_host>:<port>/<database_name>
-
Network requirements: to run properly, the services need these network ports available:
- brouter: 17777
- backend: 5000
- frontend: 3000
-
Starting the services
- brouter:
- on Unix systems: execute
brouter/misc/scripts/standalone/server.sh
- on Windows: execute
brouter/misc/scripts/standalone/server.cmd
- on Unix systems: execute
- scraper:
- with pip:
python scraper/main.py
- with pipenv:
pipenv run py main.py
while inscraper
directory
- with pip:
- backend:
- with pip:
python flask-app/app.py
- with pipenv:
pipenv run py app.py
while inscraper
directory
- with pip:
- frontend:
npm start
while incan-frontend
directory; a new tab with the application will open in your default browser
- brouter: