dockerize front end (#558)

* initial docker

* adds concurrency to be able to run yarn install

* adds 0.0.0.0 to allow docker access

* adds web service

* adds env variables

* updates root path

* adds volumes

* adds docker to readme

* adds score server client docker

* docker updates after convo

* speeds up build and removes env vars

* adds client as volume

* updates to docker setup

* checkpoint

* updates the docker file

* adds .env.* files

* replaces serve with http-server for cors

Co-authored-by: Jorge Escobar <jorge.e.escobar@omb.eop.gov>
This commit is contained in:
Vim 2021-09-01 11:16:29 -07:00 committed by GitHub
commit 89c23faf7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 113 additions and 30 deletions

View file

@ -11,6 +11,7 @@ This README contains the following content:
## Installing and running the client site
### Via npm
1. Confirm you have the base required software installed. See [INSTALLATION](INSTALLATION.md) for more details.
1. Install yarn if you do not have it yet. Open your terminal and run `sudo npm install -global yarn`. This works on MacOS and Win10. To confirm it is installed, run `yarn -v`. A version number should be returned.
1. Navigate to the base directory of this repository, and go to the `client` directory (`cd client`).
@ -20,6 +21,17 @@ This README contains the following content:
_Note that while this app uses npm as the package manager, yarn is required to build the [uswds](https://github.com/uswds/uswds) library._
### Via docker
- Launch VS code in the top level directory (above client)
- install the Microsoft docker VS code extension
- type `docker-compose up`
- Running this on MacBook Pro with a 2.6GHz 6-core i7 with 16 GB of memory can take upto 20 minutes to complete.
#### Troubleshooting docker
- If an error is thrown about [running out of space](https://medium.com/@wlarch/no-space-left-on-device-when-using-docker-compose-why-c4a2c783c6f6) on device see this for ways to reclaim space.
### Viewing data on the map
See [VIEW_MAP_DATA](./VIEW_MAP_DATA) for more details on this.