Skip to content

Commit f1f3bff

Browse files
authored
Initial commit
0 parents  commit f1f3bff

File tree

113 files changed

+30351
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+30351
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.env.development

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
GEN3_COMMONS_NAME=gen3
2+
NEXT_PUBLIC_GEN3_API=https://localhost:3010
3+
NEXT_PUBLIC_GEN3_DOMAIN=https://localhost:3010
4+
5+
# set these if you want to use different endpoints
6+
#NEXT_PUBLIC_GEN3_GUPPY_API=

.env.production

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
GEN3_COMMONS_NAME=gen3
2+
NEXT_PUBLIC_GEN3_API=https://localhost/
3+
NEXT_PUBLIC_GEN3_DOMAIN=https://localhost/

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.css
2+
node_modules

.eslintrc.js

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:jsx-a11y/recommended',
10+
'plugin:react/recommended',
11+
'plugin:react-hooks/recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'plugin:@next/next/recommended',
14+
'prettier',
15+
],
16+
parser: '@typescript-eslint/parser',
17+
parserOptions: {
18+
ecmaFeatures: {
19+
jsx: true,
20+
},
21+
ecmaVersion: 12,
22+
sourceType: 'module',
23+
},
24+
plugins: ['jsx-a11y', 'react', 'react-hooks', '@typescript-eslint'],
25+
rules: {
26+
'@typescript-eslint/no-explicit-any':['warn'],
27+
'no-underscore-dangle': 'off',
28+
'import/prefer-default-export': 'off',
29+
'linebreak-style': ['error', 'unix'],
30+
'@typescript-eslint/quotes': ['warn', 'single'],
31+
quotes: ['warn', 'single'],
32+
'jsx-quotes': ['warn', 'prefer-double'],
33+
semi: ['error', 'always'],
34+
'prefer-destructuring': ['error', { object: true, array: false }],
35+
'react/jsx-fragments': ['warn', 'element'],
36+
// disable these because we're using React 17+ with the jsx transform
37+
'react/jsx-uses-react': 'off',
38+
'react/react-in-jsx-scope': 'off',
39+
},
40+
overrides: [
41+
{
42+
files: ['**/*.tsx'],
43+
rules: {
44+
'react/prop-types': 'off',
45+
},
46+
},
47+
],
48+
settings: {
49+
react: {
50+
version: 'detect',
51+
},
52+
next: {
53+
rootDir: './',
54+
},
55+
},
56+
};

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.github/workflows/ci.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
on: push
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/[email protected]
9+
with:
10+
node-version: 20.11.0
11+
- name: install npm version
12+
run: npm install -g npm
13+
- name: Get Version
14+
run: npm -v
15+
- name: Install modules
16+
17+
run: npm ci
18+
- name: Run ESLint
19+
run: npm run lint
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build Image and Push to Quay
2+
3+
on: push
4+
5+
jobs:
6+
Security:
7+
name: Security Pipeline
8+
uses: uc-cdis/.github/.github/workflows/securitypipeline.yaml@master
9+
with:
10+
python-poetry: 'false'
11+
secrets: inherit
12+
ci:
13+
name: Build Image and Push to Quay
14+
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
15+
with:
16+
USE_QUAY_ONLY: true
17+
secrets:
18+
ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
19+
ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
20+
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
21+
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules
3+
.next/cache/*

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.pre-commit-config.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: [email protected]:Yelp/detect-secrets
3+
rev: v1.4.0
4+
hooks:
5+
- id: detect-secrets
6+
args: ['--baseline', '.secrets.baseline']
7+
exclude: 'package-lock.json'
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v2.5.0
10+
hooks:
11+
- id: trailing-whitespace
12+
- id: end-of-file-fixer
13+
- id: no-commit-to-branch
14+
args: [--branch, develop, --branch, main, --pattern, release/.*]

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.next
3+
public
4+
dist

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"trailingComma": "all",
5+
"singleQuote": true
6+
}

.secrets.baseline

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"version": "1.4.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "HexHighEntropyString",
31+
"limit": 3.0
32+
},
33+
{
34+
"name": "IbmCloudIamDetector"
35+
},
36+
{
37+
"name": "IbmCosHmacDetector"
38+
},
39+
{
40+
"name": "JwtTokenDetector"
41+
},
42+
{
43+
"name": "KeywordDetector",
44+
"keyword_exclude": ""
45+
},
46+
{
47+
"name": "MailchimpDetector"
48+
},
49+
{
50+
"name": "NpmDetector"
51+
},
52+
{
53+
"name": "PrivateKeyDetector"
54+
},
55+
{
56+
"name": "SendGridDetector"
57+
},
58+
{
59+
"name": "SlackDetector"
60+
},
61+
{
62+
"name": "SoftlayerDetector"
63+
},
64+
{
65+
"name": "SquareOAuthDetector"
66+
},
67+
{
68+
"name": "StripeDetector"
69+
},
70+
{
71+
"name": "TwilioKeyDetector"
72+
}
73+
],
74+
"filters_used": [
75+
{
76+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
77+
},
78+
{
79+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
80+
"min_level": 2
81+
},
82+
{
83+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
84+
},
85+
{
86+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
87+
},
88+
{
89+
"path": "detect_secrets.filters.heuristic.is_lock_file"
90+
},
91+
{
92+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
93+
},
94+
{
95+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
108+
}
109+
],
110+
"results": {},
111+
"generated_at": "2024-01-26T17:55:44Z"
112+
}

Dockerfile

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# docker build -t gen3ff .
2+
# docker run -p 3000:3000 -it gen3ff
3+
# for Macbook silicon M1/m2 uncomment the following lines and comment quay.io/cdis/ubuntu:20.04:
4+
#FROM arm64v8/ubuntu:20.04 as build
5+
6+
FROM quay.io/cdis/ubuntu:20.04 AS build
7+
8+
ARG NODE_VERSION=20
9+
10+
ARG BASE_PATH
11+
ARG NEXT_PUBLIC_PORTAL_BASENAME
12+
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
13+
ENV PATH=$PATH:/home/node/.npm-global/bin
14+
15+
WORKDIR /gen3
16+
17+
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
build-essential \
19+
libssl1.1 \
20+
libgnutls30 \
21+
ca-certificates \
22+
curl \
23+
git \
24+
gnupg \
25+
&& mkdir -p /etc/apt/keyrings \
26+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
27+
&& 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 \
28+
&& apt-get update \
29+
&& apt-get install -y nodejs \
30+
&& apt-get clean \
31+
&& npm install -g [email protected]
32+
33+
RUN addgroup --system --gid 1001 nextjs && adduser --system --uid 1001 nextjs
34+
COPY ./package.json ./package-lock.json ./
35+
COPY ./package-lock.json ./
36+
COPY ./src ./src
37+
COPY ./public ./public
38+
COPY ./config ./config
39+
COPY ./next.config.js ./
40+
COPY ./tsconfig.json ./
41+
COPY ./.env.development ./
42+
COPY ./.env.production ./
43+
COPY ./tailwind.config.js ./
44+
COPY ./postcss.config.js ./
45+
RUN npm ci
46+
RUN npm install \
47+
"@swc/core" \
48+
"@napi-rs/magic-string"
49+
RUN npm run build
50+
ENV PORT=80
51+
CMD ["npm", "run", "start"]

0 commit comments

Comments
 (0)