Skip to content

justEugene94/exchanger-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

  • Clone Project

cd /home/projects
sudo mkdir exchange_office
sudo chown {{YOUR_USER}}:{{YOUR_USER}} exchange_office

git clone [email protected]:justEugene94/exchanger-api.git
  • Add init.sql file

cd docker/mysql/docker-entrypoint-initdb.d
cp init.sql.example init.sql
  • Build Docker

sudo service nginx stop
sudo service mysql stop

docker-compose up --build
  • Migrations, seeds and static for Django

Enter in python container:

docker-compose exec python bash

Migrations:

python3 manage.py migrate

Seeds:

python3 manage.py loaddata currencies commerce_value
python3 manage.py coefficient_seed --number=20
python3 manage.py purchase_seed --customers=10 --purchases=15

Static:

python3 manage.py collectstatic

Functional tests:

docker-compose run django ./manage.py test