Skip to content

Commit

Permalink
Update to latest DS in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
anselmbradford committed Dec 20, 2024
1 parent f554de0 commit 20c27db
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 123 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
**

# ...except for all of this
!.yarnrc.yml
!esbuild/**/*.js

!manage.py
Expand Down
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ RUN addgroup \
ENV APP_HOME /home/$USERNAME

Check warning on line 29 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
WORKDIR $APP_HOME

# Define frontend environment.
ENV YARN_VERSION "4.5.3"

Check warning on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Copy the whole project except for what is in .dockerignore.
COPY --chown=$USERNAME:$USERNAME . .

Expand Down Expand Up @@ -68,13 +71,13 @@ ENV NODE_ENV=production
RUN set -eux; \
\
# Needed only at build time, so we can delete after use.
apk add --no-cache --virtual .frontend-deps \
# TODO: Remove curl once frontend build no longer curls from www.cf.gov.
curl \
yarn \
; \
yarn global add corepack && corepack enable; \
yarn && yarn build; \
apk add --no-cache --virtual .frontend-deps npm \
curl; \
npm install -g corepack; \
corepack enable; \
corepack prepare yarn@${YARN_VERSION} --activate; \
yarn install; \
yarn build; \
# We don't need node_modules once we've built our frontend.
rm -rf ./node_modules; \
apk del .frontend-deps
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
"watch": "yarn build watch"
},
"dependencies": {
"@cfpb/cfpb-design-system": "^3.5.0",
"@cfpb/cfpb-design-system": "3.6.2",
"@csstools/postcss-sass": "5.1.1",
"@csstools/sass-import-resolve": "1.0.0",
"autoprefixer": "^10.4.20",
"esbuild": "^0.24.0",
"esbuild": "^0.24.2",
"esbuild-plugin-copy": "^2.1.1",
"postcss": "^8.4.49",
"postcss-scss": "4.0.9"
},
"devDependencies": {
"prettier": "^3.4.1",
"prettier": "^3.4.2",
"prettier-plugin-jinja-template": "^2.0.0"
},
"prettier": {
Expand Down
2 changes: 1 addition & 1 deletion viewer/static_src/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * as MainStyles from "../css/main.scss";

import { Expandable } from "@cfpb/cfpb-design-system/src/index.js";
import { Expandable } from "@cfpb/cfpb-design-system";

const docElement = document.documentElement;
docElement.className = docElement.className.replace(
Expand Down
Loading

0 comments on commit 20c27db

Please sign in to comment.