Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
prefix=test-image-

- name: Login to GitHub Container Registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
submodules: recursive

- name: Login to GitHub Container Registry
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
container:
image: rclone/rclone:1.62.2
image: docker.io/rclone/rclone:1.75.1
strategy:
matrix:
deploy_env: [production, staging]
Expand Down
29 changes: 9 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,40 @@
FROM docker.io/library/node:20-bookworm-slim
FROM docker.io/library/node:24-trixie-slim

ARG TARGETARCH

ENV \
DOCKER=true \
NODE_OPTIONS=--use-openssl-ca \
NODE_MODULES_DIR=/usr/local/node_modules \
PNPM_HOME=/usr/local/pnpm

RUN apt-get update && \
apt-get -y --no-install-recommends install curl ca-certificates && \
rm -rf /var/lib/apt/lists/* /var/lib/dpkg/*-old /var/cache/* /var/log/*

ARG HUGO_VERSION=0.159.1
ARG HUGO_VERSION=0.160.1
RUN set -x && \
curl -fsSL "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz" | tar -xvz -C /usr/local/bin/ --wildcards "hugo"

ARG DART_SASS_VERSION=1.98.0
ARG DART_SASS_VERSION=1.105.1
RUN set -x && \
arch="$TARGETARCH" && \
if [ "$TARGETARCH" = "amd64" ]; then \
arch="x64"; \
fi && \
curl -fsSL "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${arch}.tar.gz" | tar -xvz --strip-components 1 -C /usr/local/bin/ --wildcards "*/sass" --wildcards "*/src/*"

# Install pnpm
#
# Set store-dir for pnpm config due to PNPM_HOME not affecting things with some
# of our development volume mounts: https://github.com/pnpm/pnpm/issues/7050
ARG PNPM_VERSION=10.33.0
# Configure pnpm.
RUN set -x && \
npm install -g "@pnpm/exe@${PNPM_VERSION}" && \
corepack enable && \
mkdir -p ~/.config/pnpm && \
printf "update-notifier=false\nstore-dir=${PNPM_HOME}/store\n" > ~/.config/pnpm/rc
printf "updateNotifier: false\nstoreDir: ${PNPM_HOME}/store\n" > ~/.config/pnpm/config.yaml

RUN mkdir -p /app
WORKDIR /app

# Symlink the local node_modules to the system-wide node directory.
#
# Note, we create a `.pnpm` directory inside, since it seems to sidestep this issue of
# install failing if node_modules is a symlink:
# https://github.com/pnpm/pnpm/issues/7690
COPY package.json pnpm-lock.yaml /app/
RUN mkdir -p "${NODE_MODULES_DIR}/.pnpm" && \
ln -s "$NODE_MODULES_DIR" /app/node_modules && \
# Install NPM dependencies.
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml /app/
RUN --mount=type=cache,target=/usr/local/pnpm/store \
pnpm install

COPY .prettierignore .prettierrc.yml config.yaml eslint.config.js postcss.config.js /app/
Expand All @@ -54,5 +44,4 @@ COPY content /app/content
COPY layouts /app/layouts
COPY vendor/datagov-11ty/styles /app/vendor/datagov-11ty/styles

ENTRYPOINT ["/app/bin/docker-entrypoint", "--"]
CMD ["/app/bin/docker-start"]
20 changes: 0 additions & 20 deletions bin/docker-entrypoint

This file was deleted.

9 changes: 3 additions & 6 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseURL: /
languageCode: en-us
locale: en-us
title: api.data.gov
disableKinds:
- RSS
Expand Down Expand Up @@ -116,8 +116,5 @@ module:
target: static/node_modules/@uswds/uswds/dist/js/
disable404: true
security:
exec:
# Add HOME to allowed environment variables list for compatibility with
# asdf-nodejs for postcss.
osEnv:
- "(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|HOME)$"
allowContent:
- ".*"
2 changes: 2 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ services:
CI: true
volumes:
- .:/app
# Copy installed modules from built image.
- /app/node_modules/
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ services:
context: .
volumes:
- .:/app
- node_modules_cache:/app/node_modules
- pnpm_cache:/usr/local/pnpm
- npm_cache:/usr/local/node_modules
ports:
- "4490:4490"
- "4491:4491"
volumes:
node_modules_cache:
pnpm_cache:
npm_cache:
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"prettier": "^3.9.6",
"prettier-plugin-go-template": "^0.0.15",
"vue-eslint-parser": "^10.4.1"
}
},
"packageManager": "pnpm@12.8.2+sha512.a5941679663d952c5f0ecc38ba98af98b4dc01b95780354f6894f2f873973cef2f7e2989d7db3ee5393938ae21f62fe06bcdf685d475ddad829a62095d2b8b11"
}
158 changes: 158 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading