Prices tracker is an application which get information about products from supported sites.
- Python 3.6+
- Web server nginx (optional)
- Docker (optional)
$ pip install -r requirements.txt
Run:
$ python3 main.py -W
Prepare:
$ sudo apt install nginx
$ sudo cp configs/nginx/nginx.conf /etc/nginx/
$ sudo mkdir -p /etc/nginx/sites-available && sudo mkdir -p /etc/nginx/sites-enabled
$ sudo cp -r configs/nginx/sites-available /etc/nginx/sites-available
$ sudo ln -s /etc/nginx/sites-enabled/web_app.conf /etc/nginx/sites-available/web_app.conf
$ sudo rm -f /etc/nginx/sites-enabled/default && sudo rm -f /etc/nginx/sites-available/default
Run:
$ sudo systemctl start nginx
$ cd web_app
$ uwsgi --ini uwsgi.ini &
Prepare:
$ mkdir databases
$ docker build -t web_application_image .
$ docker volume create web_app_databases
Run:
$ docker run -d -e TZ=$(timedatectl | grep "Time zone" | xargs | cut -d" " -f 3) --rm --name prices_tracker_app -p 80:80 -v web_app_databases:/<path_to_program_directory>/prices_tracker/databases web_application_image
Stop:
$ docker stop prices_tracker_app
Delete docker volume:
$ docker volume rm web_app_databasses