Closed ajtucker closed 2 years ago
Hey team! Please add your planning poker estimate with ZenHub @cjfairchild @charlesons @rossbowen @TahaRana97 @osamede20
I missed saying that I'd had a look at some multi-stage build things in https://github.com/GSS-Cogs/dd-cms/blob/volto-docker/volto/Dockerfile
A couple of minor issues with yarn.lock
and .dockerignore
in #99
Fixed yarn test
in Jenkins by #100.
Still to look at multi-stage build for the main Volto Docker images.
I've added some minor changes to https://github.com/GSS-Cogs/dd-cms/blob/volto-docker/volto/Dockerfile#L17 to get a multi-stage build that uses a similar approach to the test Dockerfile image.
The current issue is that the Razzle build (yarn -s build
line) is meant to make a self-contained app in the build directory which can be run directly with node ./server.js
, but there are still some external dependencies that haven't been bundled, e.g. lodash
from the govuk-react-jsx
package.
@nosnickid, this is probably one for you?
sure, i'll pick this one up
Seems like the deployment depends on the node_modules
being deployed along with the built assets.
That's totally opposite to what you would expect from a 'built' output, but the azure deployment docs definitely include them - see "Zip the Razzle project":
On the other hand, the plesk docs explicitly don't include the node_modules!
Oh, for plesk the instructions have a 'Run NPM install step'.
So I'll just tweak the Dockerfile
to include node_modules
.
@ajtucker this should be ready for you to try again now.
I've done some minor tweaks to the Jenkinsfile and forced the pipeline to run in Jenkins - reducing run time and RAM utilisation significantly. It appears the HTML publishing plugin in Jenkins was attempting to archive all of the files in the build/test context in a heap in Java, which was causing OOM errors.
See branch ci-di for more. Suggested Changes are in a PR for Restricting Jest tests.
The image is nearly 3GB and could do with using multi-stage build and better use of image layers so that e.g.
yarn develop
andyarn install
only need to be run when package.json (& lockfile) change.The
yarn test
step currently seems to overload our server.