Skip to content

Commit 813c29e

Browse files
ocshawncmlsnsnyk-botShawn O'Connorcraigrbarnes
authored
Chore/sync upstream (#64)
* fix: package.json & package-lock.json to reduce vulnerabilities (#82) The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-NEXT-9508709 Co-authored-by: snyk-bot <snyk-bot@snyk.io> * update next dependencies to 15.2.4 * Update README.md (#84) * update to @gen3/ff 0.10.85 (#85) * Update README.md (#86) add unrelated-histories information * Fix docker start (#88) * fix Docker not starting * fix Docker not starting * update env files (#89) * Release 0.10.89 (#91) * update to 0.10.89 * update to 0.10.89 * remove old config files/images * update ContentDatabase * update ContentDatabase paths (#93) * update apps config path (uc-cdis#94) * add theme colors into safelist (uc-cdis#95) * update to 0.10.91 (uc-cdis#96) * fix version to 0.10.91 (uc-cdis#97) * update to 0.10.92 (uc-cdis#104) * update to node 22.11, gen3FF 0.10.94 (uc-cdis#107) * update git node version * update gen3 to 0.11.11 * add favicon (uc-cdis#109) * add favicon * add favicon --------- Co-authored-by: Shawn O'Connor <shawnoconnor@uchicago.edu> * Add Datadog/remove faro (uc-cdis#105) * add Datadog/remove faro * remove Grafana * update gen3 to 0.11.18 * update gen3 to 0.11.19 and add footer links * update to Gen3 FEF 0.11.43 (uc-cdis#127) * add GradioApp support (uc-cdis#128) * add GradioApp support * fix default * update dependencies * update more dependencies * update more dependencies * add the hugging face apps (uc-cdis#129) * update tailwind paths for Gen3/frontend (uc-cdis#136) * fix default * update package-lock * fix build error * remove gradio * remove older tailwind path * update gen3 version and package lock * update gen3 to 0.11.47 * update gen3 to 0.11.48 remove unneeded cookies-next * Feat/footer (uc-cdis#139) * add the hugging face apps * Update README for clarity on Gen3 Data Commons * update development configuration * darken footer * partially revert footer changed (uc-cdis#140) * update docker image for faster builds (uc-cdis#141) * Changes to landingPage (uc-cdis#142) * Revert landingPage change (uc-cdis#143) * Update from old Gen3 Docs to new Gen3 Docs link (uc-cdis#146) * Update Gen3 docs link Update the default Documentation link from the old Gen3 docs site (https://gen3.org/resources/user/) to the new Gen3 docs site (https://docs.gen3.org/) * Update to new docs link Change the workspace docs reference from the old docs (https://gen3.org/resources/user/analyze-data/) to the new docs (https://docs.gen3.org/gen3-resources/user-guide/analyze-data/) * Update to v0.11.58 (uc-cdis#147) * add height to tailwind config * add package * add height to tailwind config * update to 0.11.55 * update deps * update to v0.11.58 * update to 0.11.59 (uc-cdis#148) * package lock update * revert unentended changes * revert unentended changes * update package lock * update ci file --------- Co-authored-by: cmlsn <100160785+cmlsn@users.noreply.github.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: Shawn O'Connor <shawnoconnor@uchicago.edu> Co-authored-by: Craig Barnes <craig.barnes@intelligentlight.com> Co-authored-by: Krishna Agarwal <159047652+krishnaa05@users.noreply.github.com> Co-authored-by: smvgarcia <111767892+smvgarcia@users.noreply.github.com>
1 parent 3e622a1 commit 813c29e

File tree

11 files changed

+876
-1134
lines changed

11 files changed

+876
-1134
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fetch-depth: 0
1010
- uses: actions/setup-node@v4.1.0
1111
with:
12-
node-version: 22.11.0
12+
node-version: 22.16.0
1313
- name: Install dependencies
1414
run: npm install
1515
- name: Install Playwright
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v2
2828
- uses: actions/setup-node@v4.1.0
2929
with:
30-
node-version: 22.11.0
30+
node-version: 22.16.0
3131
- name: Get Version
3232
run: npm -v
3333
- name: Install modules

.github/workflows/image_build_push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
secrets: inherit # pragma: allowlist-secret
1212
ci:
1313
name: Build Image and Push to Quay
14-
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
14+
uses: uc-cdis/.github/.github/workflows/image_build_push_native.yaml@master
1515
with:
1616
USE_QUAY_ONLY: true
1717
secrets:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v22.11.0
1+
v22.16.0

Dockerfile

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,61 @@
11
# docker build -t ff .
22
# docker run -p 3000:3000 -it ff
33
# Build stage
4-
FROM node:22-slim AS builder
4+
FROM --platform=$BUILDPLATFORM node:22-alpine AS builder
5+
6+
ARG TARGETPLATFORM
7+
ARG BUILDPLATFORM
58

69
WORKDIR /gen3
710

8-
COPY ./package.json ./package-lock.json ./next.config.js ./tsconfig.json ./.env.development ./tailwind.config.js ./postcss.config.js ./start.sh ./.env.production ./
9-
RUN npm ci
11+
# Copy dependency files first for better caching
12+
COPY package.json package-lock.json ./
13+
14+
# Install ALL dependencies once (including dev deps for build)
15+
RUN npm config set fetch-retries 5 && \
16+
npm config set fetch-retry-mintimeout 20000 && \
17+
npm config set fetch-retry-maxtimeout 120000 && \
18+
npm ci && \
19+
npm cache clean --force
20+
21+
# Copy necessary config files
22+
COPY next.config.js tsconfig.json tailwind.config.js postcss.config.js ./
23+
COPY .env.production ./
24+
25+
# Copy source files
1026
COPY ./src ./src
1127
COPY ./public ./public
1228
COPY ./config ./config
1329
COPY ./start.sh ./
14-
COPY ./next-custom-image-loader.js ./
15-
RUN npm install @swc/core @napi-rs/magic-string && \
16-
npm run build
30+
31+
# Build and prune
32+
RUN npm run build && \
33+
npm prune --production
1734

1835
# Production stage
19-
FROM node:22-slim AS runner
36+
FROM node:22-alpine AS runner
2037

2138
WORKDIR /gen3
2239

2340
RUN addgroup --system --gid 1001 nextjs && \
2441
adduser --system --uid 1001 nextjs
2542

26-
COPY --from=builder /gen3/package.json ./
27-
COPY --from=builder /gen3/node_modules ./node_modules
28-
COPY --from=builder /gen3/config ./config
29-
COPY --from=builder /gen3/.next ./.next
30-
COPY --from=builder /gen3/public ./public
31-
COPY --from=builder /gen3/start.sh ./start.sh
32-
RUN mkdir -p /gen3/.next/cache/images
33-
RUN chmod -R 777 /gen3/.next/cache
34-
RUN chown nextjs:nextjs /gen3/.next
43+
# Copy only production dependencies
44+
COPY --from=builder --chown=nextjs:nextjs /gen3/package.json ./
45+
COPY --from=builder --chown=nextjs:nextjs /gen3/node_modules ./node_modules
46+
COPY --from=builder --chown=nextjs:nextjs /gen3/config ./config
47+
COPY --from=builder --chown=nextjs:nextjs /gen3/.next ./.next
48+
COPY --from=builder --chown=nextjs:nextjs /gen3/public ./public
49+
COPY --from=builder --chown=nextjs:nextjs /gen3/start.sh ./start.sh
50+
51+
RUN mkdir -p .next/cache/images && \
52+
chmod +x start.sh && \
53+
chown -R nextjs:nextjs .next/cache
3554

3655
USER nextjs:nextjs
37-
ENV PORT=3000
38-
CMD bash ./start.sh
56+
57+
ENV NODE_ENV=production \
58+
PORT=3000 \
59+
NEXT_TELEMETRY_DISABLED=1
60+
61+
CMD ["sh", "./start.sh"]

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The following steps usually apply to update a forked commons.
6969

7070
Get the changes from the parent fork:
7171
```bash
72-
git remote add upstream git@github.com:uc-cdis/commons-frontend-app.git
72+
git remote add upstream git@github.com:uc-cdis/commons-frontend-app.git
7373
git fetch upstream
7474
```
7575
Create a branch and merge changes from upstream:
@@ -86,4 +86,3 @@ If you use this flag, it is recommended that you carefully review the changes an
8686

8787
You will see merge conflicts. In general: **take the remote's version for everything except the config files**, as those are customized to the commons config. Resolve any remaining config issues and open a PR.
8888
Test the new common by running it locally or in a staging environment.
89-

config/vpodcqa/discovery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"downloadManifestButtonText": "Download Manifest",
4444
"documentationLinks": {
4545
"gen3Client": "https://gen3.org/resources/user/gen3-client/",
46-
"gen3Workspaces": "https://gen3.org/resources/user/analyze-data/"
46+
"gen3Workspaces": "https://docs.gen3.org/gen3-resources/user-guide/analyze-data/"
4747
},
4848
"verifyExternalLogins": true
4949
},

config/vpodcqa/session.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"sessionConfig" : {
33
"updateSessionTime": 5,
44
"inactiveTimeLimit": 20,
5-
"logoutInactiveUsers": true
5+
"logoutInactiveUsers": false,
6+
"monitorWorkspace": true
67
}
78
}

0 commit comments

Comments
 (0)