mo' readme tweaks

This commit is contained in:
Elijah Lucian 2021-07-15 20:07:48 -06:00
parent 73a8006ac3
commit 18ebca4c0a
2 changed files with 27 additions and 5 deletions

View File

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

View File

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