This PR drastically overhauls the current docker implementation to support multiple use cases.
Use Cases:
Serve the built/compiled frontend via nginx and proxy requests to the backend api (written in go) through the same endpoint/port
Serve the built/compiled frontend via nginx without proxying to the backend api
Serve the loaded (not-synced) frontend via npm start
Serve the frontend mounted with source code on the host system. This allows for mounting the source as a volume and restarting the app automatically via npm start or manually (via refresh) with nginx
Detailed instructions are included in the README.md file.
Dependencies Added
cra-build-watch
External Breaking Changes:
API Endpoints must sit at /api/v1/{endpoint} in order to proxied effectively
Other Considerations
When websockets are introduced, the dynamically generated nginx config file in docker-run.sh may need to be altered slightly.
A few files were automatically formatted via tslint so there may be some whitenoise. This can be fixed later.
This PR drastically overhauls the current docker implementation to support multiple use cases.
Use Cases:
npm start
npm start
or manually (via refresh) with nginxDetailed instructions are included in the README.md file.
Dependencies Added
External Breaking Changes:
Other Considerations