Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build a docker image for the production webapp
This uses the same http-server image as the development webapp, but copies all non-plot files into the container. This ensures that the container can be scanned for vulnerabilities. The plots are stored in a mounted volume because they are generated by the `viz_scripts` container and stored in the shared, mounted volume. ``` => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 42B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/danjellz/http-server:1.4 0.0s => [internal] load build context 0.0s => => transferring context: 1.76kB 0.0s => [1/4] FROM docker.io/danjellz/http-server:1.4 0.0s => CACHED [2/4] RUN mkdir -p /public 0.0s => CACHED [3/4] COPY ../client /public/client 0.0s => CACHED [4/4] COPY ../*.html /public 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:ff0154b07bbb0d6dc2e78343bf4f842fe2eee85c980ae04d4e01788356b6eab6 0.0s => => naming to docker.io/em-pub-dash-prod/frontend 0.0s ``` ``` dashboard_1 | Starting up http-server, serving ./ dashboard_1 | dashboard_1 | http-server version: 14.1.1 dashboard_1 | dashboard_1 | http-server settings: dashboard_1 | CORS: disabled dashboard_1 | Cache: 3600 seconds dashboard_1 | Connection Timeout: 120 seconds dashboard_1 | Directory Listings: visible dashboard_1 | AutoIndex: visible dashboard_1 | Serve GZIP Files: false dashboard_1 | Serve Brotli Files: false dashboard_1 | Default File Extension: none dashboard_1 | dashboard_1 | Available on: dashboard_1 | http://127.0.0.1:8080 dashboard_1 | http://172.20.0.4:8080 dashboard_1 | Hit CTRL-C to stop the server dashboard_1 | dashboard_1 | [2022-09-07T20:57:57.039Z] "GET /" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0" dashboard_1 | (node:1) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated dashboard_1 | (Use `node --trace-deprecation ...` to show where the warning was created) dashboard_1 | [2022-09-07T20:57:57.127Z] "GET /client/css/nrel.application.min.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0" dashboard_1 | [2022-09-07T20:57:57.128Z] "GET /client/css/bootstrap.min.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0" dashboard_1 | [2022-09-07T20:57:57.129Z] "GET /client/css/dashboard.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0" ``` The resulting web page is displayed correctly
- Loading branch information