Committing work for creating docker images of Web and API apps
Outstanding work include: - Adding CI/CD workflow compatible with Woodpecker CI - Figure out how to load runtime environment variables onto the API docker build process
This commit is contained in:
@ -68,3 +68,17 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/d
|
||||
### `npm run build` fails to minify
|
||||
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
|
||||
|
||||
---
|
||||
## Docker
|
||||
|
||||
To build a dockerized version of the Web project:
|
||||
|
||||
```
|
||||
docker build { WEB_PROJECT_ROOT_SOURCE } -f { WEB_PROJECT_DOCKERFILE_PATH } -t { imagename:tag }
|
||||
```
|
||||
|
||||
In order to run a container using the image built above, keep the following things in mind:
|
||||
- It might be necessary to map container port 80 to another
|
||||
- Environment variables actively used by the web app can be overriden when starting uip a container. They are prefixed with: `REACT_APP`
|
||||
- Environment variables that are explicitly listed in `Web\Dockerfile` will have to be properly set for proper operation of the application
|
||||
|
||||
Reference in New Issue
Block a user