CarParker is a web based searching engine to facilitate drivers to quickly find a parking with acceptable rates. It crawls the web to build up an up-to-date database of parking rates which is then used to serve search results to end users.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You need to have Docker Engine and docker-compose installed.
Create a new file parker/settings.py.
Copy the contents from parker/settings.default.py into the new file.
Alternatively, on Unix/Linux systems you can simply create a symlink by running.
ln -s parker/settings/default.py parker/settings.py
Start docker containers
docker-compose up -d
In order to run any commands and test your code, you need to be attached to the main app container. In order to do so, execute
docker exec -i -t carparker_parker_1 /bin/bash
Run the following command in order to download HTML cache for all known carparks.
python3 scripts/downloadParkingRatesHTML.py
Run the following command to process and store the cached rates.
python3 scripts/loadParkingRates.py
Tests are located in parker/tests/.py*.
To execute test run:
./runtests.sh
If any changes has been made to the data in database, they need to be backed up manually in order to not get lost. It can be done by running a backup_db.sh script from the main app container.
Used SemVer for versioning. For the versions available, see the tags on this repository.
Copyright (C) Maxim Pak - All Rights Reserved