- docker (tested on version 2.0.0.3 (31259))
- docker-compose (tested on version 1.23.2, build 1110ad01)
- make (tested on GNU Make 3.81)
make run
COMMAND=migrate make command
Command can be run solely or in another terminal window, in parallel with server running.
COMMAND=download_currencies make command
This will download currencies 'BTC', 'ETH', 'XRP', 'LTC', 'AIO'
for last 10 days into database.
To specify different currencies, use following syntax:
COMMAND=download_currencies ARGS='"-c BTC ETH"' make command
Command can be run solely or in another terminal window, in parallel with server running.
Open http://localhost:8080/ in browser to find available resources.
All API resources are protected with Basic Auth. In development, following credentials can be used:
- login:
user
- password:
password
To run tests, execute the following command:
make test
Note: it is better to stop currently running instance of the project before running the tests.
-
stop and remove all docker containers:
make clean
-
access shell in project container:
make shell
-
access database of the project:
docker exec -it currency_service_db_sql_1 psql -h 127.0.0.1 -p 5432 -U currency -d currency
Note: replace
currency_service_db_sql_1
with the name of your container. To find name of currenlty running containers, usedocker-compose ps
- setup lint checker
- setup mypy
- setup CI