Dockefile/buildspec changes for faster buildtime; Some CF changes - #80
Conversation
…ildx changes for caching
…nto feature/cf-changes
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
✅ I finished the code review, and didn't find any security or code quality issues. |
…nto feature/cf-changes
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…nto feature/cf-changes
| COPY --chown=app:app package.json package-lock.json ./ | ||
| RUN npm ci | ||
|
|
||
| COPY --chown=app:app . . |
There was a problem hiding this comment.
I think we discussed this in a PR for one of the Shiny apps. Does the app user need to be able to modify these files? If not, we should probably leave root as the owner and just give app read access.
There was a problem hiding this comment.
This PR was created to change this portion.
| FROM public.ecr.aws/docker/library/node:22-alpine | ||
|
|
||
| WORKDIR /usr/src/app | ||
| RUN adduser -D -s /bin/sh app && mkdir -p /usr/src/app && chown app:app /usr/src/app |
There was a problem hiding this comment.
I looks like the old adduser command included -H to skip creating a home directory. Why was that removed?
This PR contains the following changes:
Docker images (
app/Dockerfile,executor/Dockerfile)chown -R-ing everything at the end. The new process drastically shortens the backend buildtime.package.json/package-lock.json,requirements.txt), install deps, then copy the rest of the source — so dependency layers aren't invalidated onevery source change.
CodeBuild buildspecs (
app/api/buildspec.yml,executor/buildspec.yml)docker build --cache-from(pull :latest) todocker buildx buildusing a docker-container builder. This portion was duplicated from Rally buildspec configurations.CloudFormation (
cloudformation/templates/1-main.yml,x-parameter-values.md)CreateExecutorS3Bucketparameter (defaults toThe S3 Bucket already exists) and wire it into the executor CodePipeline stack's CreateS3Bucket. When testing new deployments of Runway in a different AWS account, the deployment was erroring due to theCreateS3Bucketparameter being used for two different resources.OAuth2Issuerto the Beanstalk metadata.This was tested in
akitson-runway-dev.