forked from uc-cdis/commons-frontend-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to 0.10.61 * fix image paths * set production * set production * remove default basepath * remove extra pages/pages directory :( * update Docker file, set directory permissions
- Loading branch information
1 parent
fc879b9
commit db9ac7d
Showing
119 changed files
with
12,388 additions
and
5,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
BASE_PATH=/ff | ||
GEN3_COMMONS_NAME=brh | ||
NEXT_PUBLIC_GEN3_API='https://brhstaging.data-commons.org' | ||
NEXT_PUBLIC_GEN3_AI_SEARCH_API='https://brhstaging.data-commons.org/ai' | ||
GEN3_COMMONS_NAME=gen3 | ||
NEXT_PUBLIC_GEN3_API=https://brhstaging.data-commons.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
BASE_PATH=/ff | ||
GEN3_COMMONS_NAME=brh | ||
NEXT_PUBLIC_GEN3_API='https://brhstaging.data-commons.org' | ||
NEXT_PUBLIC_GEN3_AI_SEARCH_API='https://brhstaging.data-commons.org/ai' | ||
GEN3_COMMONS_NAME=gen3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.css | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@next/next/recommended', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 12, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['jsx-a11y', 'react', 'react-hooks', '@typescript-eslint'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any':['warn'], | ||
'no-underscore-dangle': 'off', | ||
'import/prefer-default-export': 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
'@typescript-eslint/quotes': ['warn', 'single'], | ||
quotes: ['warn', 'single'], | ||
'jsx-quotes': ['warn', 'prefer-double'], | ||
semi: ['error', 'always'], | ||
'prefer-destructuring': ['error', { object: true, array: false }], | ||
'react/jsx-fragments': ['warn', 'element'], | ||
// disable these because we're using React 17+ with the jsx transform | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.tsx'], | ||
rules: { | ||
'react/prop-types': 'off', | ||
}, | ||
}, | ||
], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
next: { | ||
rootDir: './', | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.17.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,32 @@ | ||
# docker build -t gen3ff . | ||
# docker run -p 3000:3000 -it gen3ff | ||
# for Macbook silicon M1/m2 uncomment the following lines and comment quay.io/cdis/ubuntu:20.04: | ||
#FROM arm64v8/ubuntu:20.04 as build | ||
# docker build -t brhff . | ||
# docker run -p 3000:3000 -it brhff | ||
# Build stage | ||
FROM node:20-slim AS builder | ||
|
||
FROM quay.io/cdis/ubuntu:20.04 as build | ||
|
||
ARG NODE_VERSION=20 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG BASE_PATH | ||
ARG NEXT_PUBLIC_PORTAL_BASENAME | ||
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | ||
ENV PATH=$PATH:/home/node/.npm-global/bin | ||
|
||
WORKDIR /gen3 | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
libssl1.1 \ | ||
libgnutls30 \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
gnupg \ | ||
nginx \ | ||
python3 \ | ||
time \ | ||
vim \ | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y nodejs \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/src/apt/lists/* \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
&& npm install -g [email protected] | ||
|
||
RUN addgroup --system --gid 1001 nextjs && adduser --system --uid 1001 nextjs | ||
COPY ./package.json ./package-lock.json ./ | ||
COPY ./package-lock.json ./ | ||
COPY ./package.json ./package-lock.json ./next.config.js ./tsconfig.json ./.env.development ./tailwind.config.js ./postcss.config.js ./ | ||
RUN npm ci | ||
COPY ./src ./src | ||
COPY ./public ./public | ||
COPY ./config ./config | ||
COPY ./next.config.js ./ | ||
COPY ./tsconfig.json ./ | ||
COPY ./.env.development ./ | ||
COPY ./.env.production ./ | ||
COPY ./tailwind.config.js ./ | ||
COPY ./postcss.config.js ./ | ||
COPY ./start.sh ./ | ||
RUN npm ci | ||
RUN npm install \ | ||
"@swc/core" \ | ||
"@napi-rs/magic-string" | ||
RUN npm run build | ||
RUN npm install @swc/core @napi-rs/magic-string && \ | ||
npm run build | ||
|
||
# Production stage | ||
FROM node:20-slim AS runner | ||
|
||
WORKDIR /gen3 | ||
|
||
RUN addgroup --system --gid 1001 nextjs && \ | ||
adduser --system --uid 1001 nextjs | ||
USER nextjs | ||
COPY --from=builder --chown=nextjs:nextjs /gen3/config ./config | ||
COPY --from=builder --chown=nextjs:nextjs /gen3/public ./public | ||
COPY --from=builder --chown=nextjs:nextjs /gen3/.next/standalone ./ | ||
COPY --from=builder --chown=nextjs:nextjs /gen3/.next/static ./.next/static | ||
|
||
ENV PORT=3000 | ||
CMD bash ./start.sh | ||
CMD ["node", "server.js"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.