Add development environment documentation to README
This commit is contained in:
parent
9fc83f5974
commit
d98d395bdf
2 changed files with 46 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
venv
|
|
45
README.md
45
README.md
|
@ -1,3 +1,48 @@
|
||||||
# RightTree
|
# RightTree
|
||||||
|
|
||||||
Right Plant Right Place Right Time implementation using React and Django.
|
Right Plant Right Place Right Time implementation using React and Django.
|
||||||
|
|
||||||
|
## Running application for development
|
||||||
|
### Initial Setup
|
||||||
|
|
||||||
|
Before running the applications please ensure the following prerequisites have been met.
|
||||||
|
#### Software
|
||||||
|
Most applications in this repository are built using Docker which resolves many dependencies but you will require a local installation of `git`, `docker` and `docker-compose`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo apt install git docker-compose
|
||||||
|
```
|
||||||
|
|
||||||
|
To install `docker`, follow the [official installation documentation](https://docs.docker.com/get-docker/). [Instructions are also available for `docker-compose`](https://docs.docker.com/compose/install/).
|
||||||
|
|
||||||
|
#### Initialise database
|
||||||
|
|
||||||
|
Creates `right_tree` database and installs `postgis` extensions.
|
||||||
|
|
||||||
|
```
|
||||||
|
chmod +x ./database/init_database.sh
|
||||||
|
./database/init_database.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Initial build
|
||||||
|
|
||||||
|
Builds the Django backend docker image. This may need to be re-run if any new dependencies are added.
|
||||||
|
```
|
||||||
|
docker-compose build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run web application
|
||||||
|
|
||||||
|
Starts up the applications including the frontend, backend and database.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
Once running the components can be accessed as follows:
|
||||||
|
|
||||||
|
| Application | Hosted |
|
||||||
|
| --- | --- |
|
||||||
|
| React Frontend | http://localhost:3000 |
|
||||||
|
| Django Backend | http://localhost:8000 |
|
||||||
|
| Database | postgis://localhost:5432 |
|
Loading…
Reference in a new issue