Skip to content

Commit

Permalink
docs: Update Docker instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
hcat-pge committed May 6, 2020
1 parent c4584e1 commit e8c70cb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,32 @@ the Django app must be running**.

The easiest way to get started is by deploying both Docker containers on your
local machine. For help installing Docker, [reference the documentation for your
specific system](https://docs.docker.com/get-docker/). Once Docker is installed,
from the root directory of the repository, run
specific system](https://docs.docker.com/get-docker/).

`docker-compose up`
The Docker container for PyWorkflow is built from 2 images: the `front-end` and
the `back-end`. The `docker-compose.yml` defines how to combine and run the two.

This builds both the front- and back-end Docker images and runs them with
networking between the images. To use the GUI, open http://localhost:3000 in your
web-browser. To use the CLI...
In order to build each image individually, from the root of the application:
- `docker build front-end --tag FE_IMAGE[:TAG]`
- `docker build back-end --tag BE_IMAGE[:TAG]`
ex. - `docker build back-end --tag backendtest:2.0`

**Installing new Python packages**
If you write custom nodes that require additional packages, you can add these
to the Docker image by running:
```
docker exec pipenv install [package-name]
```
Each individual image can be run by changing to the `front-end` or `back-end` directory and running:
- `docker run -p 3000:3000 --name FE_CONTAINER_NAME FE_IMAGE[:TAG]`
- `docker run -p 8000:8000 --name BE_CONTAINER_NAME BE_IMAGE[:TAG]`
ex. - `docker run -p 8000:8000 --name pyworkflow-be backendtest:2.0`

Note: there [is a known issue with `react-scripts` v3.4.1](https://github.com/facebook/create-react-app/issues/8688)
that may cause the front-end container to exit with code 0. If this happens,
you can add `-e CI=true` to the `docker-run` command above for the front-end.

To compose and run the entire application container, from the root of the application:
- `docker-compose up`

You can then kill the container gracefully with:
- `docker-compose down`

NOTE: For development, change ./front-end/package.json from "proxy": "http://back-end:8000" to "http://localhost:8000" to work.


## Serve locally
Expand Down
5 changes: 0 additions & 5 deletions docs/custom_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ in PyWorkflow's `Pipfile`, your custom node won't know how to use the package.
All you have to do is install the package in PyWorkflow and you'll be good to
go!

**Docker**:
```
docker exec pipenv install [package-name]
```

**Running locally**:
```
# Go to wherever the back-end code is located
Expand Down

0 comments on commit e8c70cb

Please sign in to comment.