mo' readme tweaks

main
Elijah Lucian 3 years ago
parent 73a8006ac3
commit 18ebca4c0a
  1. 30
      README.md
  2. 2
      server/server/api/management/commands/seed.py

@ -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

@ -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

Loading…
Cancel
Save