Installation
Prerequisites
Install git, docker and docker-compose
Usage
- git clone https://github.com/steve84/StockAnalyzer.git
- cd StockAnalyzer
- sudo docker run -it --rm --name my-maven-project -v "$PWD"/backend:/usr/src/mymaven -w /usr/src/mymaven maven:3.5-jdk-8-alpine mvn clean package
- sudo docker run -it --rm --name my-running-script -v "$PWD"/frontend:/usr/src/app -w /usr/src/app node:6-alpine sh -c 'npm install; npm run build; chmod +r -R dist'
- (sudo docker-compose rm)
- sudo docker-compose up --build
- sudo docker-compose exec db psql -h localhost -p 5432 -U postgres -d postgres -f /usr/src/scripts/db_schema.sql
- sudo docker-compose run scripts python3 loadStocks.py -n 10 --host db -u postgres -d stock_db
- sudo docker-compose run scripts python3 loadStockData.py -n 10 --host db -u postgres -d stock_db
- sudo docker-compose exec db psql -h localhost -p 5432 -U postgres -d stock_db -f /usr/src/scripts/insert_stockindex.sql
- sudo docker-compose exec db psql -h localhost -p 5432 -U postgres -d stock_db -f /usr/src/scripts/insert_scoretype.sql
- sudo docker-compose run scripts python3 calculateScores.py --host db -u postgres -d stock_db
- Go to http://localhost