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 ```sh
$ git clone [this repo] $ git clone [this repo]
```
## _build containers_
```sh
$ docker-compose build $ 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 $ docker-compose run --rm server bash
# Puts you into the command line in the server container # Puts you into the command line in the server container
$ > python manage.py migrate $ > 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 $ > exit
# You are now back in your machine bash # You are now back in your machine bash
``` ```
@ -19,11 +35,11 @@ $ > exit
# Running (Docker) # Running (Docker)
```sh ```sh
# Containers will all start # Containers will all (re)start
$ docker-compose down && docker-compose up -d $ docker-compose down && docker-compose up -d
``` ```
_backend only_ ## _backend only_
```sh ```sh
$ docker-compose down && docker-compose -f docker-compose.backend.yml up -d $ 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) # Setup (Not Docker)
## Frontend
```sh ```sh
$ cd frontend $ cd frontend
$ npm i $ npm i
$ cd .. ```
## Backend
```sh
$ cd server $ cd server
$ virtualenv -p python3 env $ virtualenv -p python3 env
$ source env/bin/activate $ source env/bin/activate

@ -26,7 +26,7 @@ class Command(BaseCommand):
home = Account(name="home", details="home stacks", home = Account(name="home", details="home stacks",
income=4000, expenses=2000).save() 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!') self.stdout.write('Accounts Created!')
# create seed accounts # create seed accounts
# Home Account # Home Account

Loading…
Cancel
Save