Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Latest commit

 

History

History
80 lines (52 loc) · 1.81 KB

README.md

File metadata and controls

80 lines (52 loc) · 1.81 KB

Connect

Screenshot

Cryptoasset portfolio management app

Note: This repository is no longer active.


Prerequisites

  • Docker installed on your system.

Quick Start

Clone this repository:

❯ git clone https://github.com/polyledger/polyledger.git

You must install the web client's dependencies before running the application in Docker:

❯ cd polyledger/web_client && npm install

You will need a file containing your environment variables (either .env.development or .env.production) at the project root. The contents should contain these variables:

SECRET_KEY=<secret_key>
PYTHON_ENV=<development|production>
EMAIL_HOST_PASSWORD=<email_host_password>
DJANGO_SETTINGS_MODULE=polyledger.settings.<local|production>

Now you can build the Docker containers:

❯ cd .. && docker-compose build

Development

Start the development services:

❯ docker-compose up

If you have fresh volumes and containers, you can pre-populate the database. It will create a user that can log into the app and admin interface. Just run these commands in a separate shell:

❯ container_id=$(docker-compose ps -q server)
❯ docker exec -it $container_id python manage.py loaddata initial_data.json --app api

If you pre-populate the database, 10 coins will also be created. To fetch prices, run the following:

❯ docker exec -it $container_id python manage.py shell

This will launch an interactive Python shell. You can call the task to fetch prices:

>>> from api.tasks import fill_historical_prices
>>> fill_historical_prices()

Production

Start the production services:

❯ docker-compose -f production.yml up