diff --git a/README.md b/README.md index b7f3adb..3d8cc9b 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,27 @@ ```sh $ git clone [this repo] +``` + +## _build containers_ + +```sh $ docker-compose build +``` + +## OR _build only backend_ + +```sh +$ docker-compose -f docker-compose.backend.yml build +``` + +## _initialize database and seed data_ + +```sh $ docker-compose run --rm server bash # Puts you into the command line in the server container $ > python manage.py migrate -$ > python manage.py createsuperuser --email admin@example.com --username admin +$ > python manage.py createsuperuser --email admin@westwinds.io --username admin $ > exit # You are now back in your machine bash ``` @@ -19,11 +35,11 @@ $ > exit # Running (Docker) ```sh -# Containers will all start +# Containers will all (re)start $ docker-compose down && docker-compose up -d ``` -_backend only_ +## _backend only_ ```sh $ docker-compose down && docker-compose -f docker-compose.backend.yml up -d @@ -31,10 +47,16 @@ $ docker-compose down && docker-compose -f docker-compose.backend.yml up -d # Setup (Not Docker) +## Frontend + ```sh $ cd frontend $ npm i -$ cd .. +``` + +## Backend + +```sh $ cd server $ virtualenv -p python3 env $ source env/bin/activate diff --git a/server/server/api/management/commands/seed.py b/server/server/api/management/commands/seed.py index f939e5d..54e88ec 100644 --- a/server/server/api/management/commands/seed.py +++ b/server/server/api/management/commands/seed.py @@ -26,7 +26,7 @@ class Command(BaseCommand): home = Account(name="home", details="home stacks", income=4000, expenses=2000).save() - self.stdout.write(str(Account.objects.all().count())) + self.stdout.write(str(Account.objects.all())) self.stdout.write('Accounts Created!') # create seed accounts # Home Account