Skip to content

Commit

Permalink
Merge pull request #647 from bcgov/BCBOX-COMS
Browse files Browse the repository at this point in the history
adding bcbox changes
  • Loading branch information
nikhila-aot authored Mar 13, 2024
2 parents 89bcbc7 + 0360831 commit b6adbf4
Show file tree
Hide file tree
Showing 413 changed files with 70,163 additions and 0 deletions.
57 changes: 57 additions & 0 deletions bcbox/.codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
version: "2"
exclude_patterns:
- config/
- db/
- dist/
- features/
- "**/node_modules/"
- script/
- "**/spec/"
- "**/test/"
- "**/tests/"
- Tests/
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
plugins:
csslint:
enabled: true
editorconfig:
enabled: true
checks:
END_OF_LINE:
enabled: false
INDENTATION_SPACES:
enabled: false
INDENTATION_SPACES_AMOUNT:
enabled: false
TRAILINGSPACES:
enabled: false
eslint:
enabled: true
channel: "eslint-7"
config:
config: app/.eslintrc.js
fixme:
enabled: true
git-legal:
enabled: true
markdownlint:
enabled: true
checks:
MD002:
enabled: false
MD013:
enabled: false
MD029:
enabled: false
MD046:
enabled: false
nodesecurity:
enabled: true
sass-lint:
enabled: true
rules:
nesting-depth:
- 2
- max-depth: 5
42 changes: 42 additions & 0 deletions bcbox/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Editor directories and files
.DS_Store
.gradle
.nyc_output
.scannerwork
build
coverage
dist
files
**/e2e/videos
node_modules
# Ignore only top-level package-lock.json
/package-lock.json

# Ignore Helm subcharts
charts/**/charts
Chart.lock

# local env files
local.*
local-*.*
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.iml
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.mp4

# temp office files
~$*
23 changes: 23 additions & 0 deletions bcbox/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.html]
indent_style = space
indent_size = 2

[*.{css,js,json,jsx,scss,ts,tsx,vue}]
indent_style = space
indent_size = 2

[.{babelrc,eslintrc}]
indent_style = space
indent_size = 2

[Jenkinsfile*]
indent_style = space
indent_size = 2
8 changes: 8 additions & 0 deletions bcbox/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Autodetect text files and forces unix eols, so Windows does not break them
* text=auto eol=lf

# Force images/fonts to be handled as binaries
*.jpg binary
*.jpeg binary
*.gif binary
*.png binary
42 changes: 42 additions & 0 deletions bcbox/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Editor directories and files
.DS_Store
.gradle
.nyc_output
.scannerwork
build
coverage
dist
files
**/e2e/videos
node_modules
# Ignore only top-level package-lock.json
/package-lock.json

# Ignore Helm subcharts
charts/**/charts
Chart.lock

# local env files
*local.*
*local-*.*
.env.local
.env.*.local


# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
*.iml
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
*.mp4

# temp office files
~$*
14 changes: 14 additions & 0 deletions bcbox/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"bierner.markdown-preview-github-styles",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters",
"vue.volar",
"vue.vscode-typescript-vue-plugin"
]
}
16 changes: 16 additions & 0 deletions bcbox/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"sourceMaps": true,
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
26 changes: 26 additions & 0 deletions bcbox/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"coverage-gutters.showGutterCoverage": false,
"coverage-gutters.showLineCoverage": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"eslint.format.enable": true,
"files.insertFinalNewline": true
}
46 changes: 46 additions & 0 deletions bcbox/CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
11 changes: 11 additions & 0 deletions bcbox/COMPLIANCE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: compliance
description: |
This document is used to track a projects PIA and STRA
compliance.
spec:
- name: PIA
status: TBD
last-updated: "2022-12-19T00:00:00.000Z"
- name: STRA
status: TBD
last-updated: "2022-12-19T00:00:00.000Z"
9 changes: 9 additions & 0 deletions bcbox/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# How to contribute

Government employees, public and members of the private sector are encouraged to contribute to the repository by **forking and submitting a pull request**.

(If you are new to GitHub, you might start with a [basic tutorial](https://help.github.com/articles/set-up-git) and check out a more detailed guide to [pull requests](https://help.github.com/articles/using-pull-requests/).)

Pull requests will be evaluated by the repository guardians on a schedule and if deemed beneficial will be committed to the master.

All contributors retain the original copyright to their stuff, but by contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users **under the terms of the [license](./LICENSE) under which this project is distributed**.
49 changes: 49 additions & 0 deletions bcbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG APP_ROOT=/opt/app-root/src
ARG BASE_IMAGE=docker.io/node:20.9.0-alpine

#
# Build the frontend
#
FROM ${BASE_IMAGE} as frontend

ARG APP_ROOT
ENV NO_UPDATE_NOTIFIER=true

# NPM Permission Fix
RUN mkdir -p /.npm
RUN chown -R 1001:0 /.npm

# Build Frontend
COPY frontend ${APP_ROOT}
RUN chown -R 1001:0 ${APP_ROOT}
USER 1001
WORKDIR ${APP_ROOT}
RUN npm ci && npm run build

#
# Create the final container image
#
FROM ${BASE_IMAGE}

ARG APP_ROOT
ENV APP_PORT=8080 \
NO_UPDATE_NOTIFIER=true

# NPM Permission Fix
RUN mkdir -p /.npm
RUN chown -R 1001:0 /.npm

# Install File Structure
COPY --from=frontend ${APP_ROOT}/dist ${APP_ROOT}/dist
# COPY .git ${APP_ROOT}/.git # Temporarily commented out line due to OCP build failure. Unsure why it is necessary in the first place.
COPY app ${APP_ROOT}
WORKDIR ${APP_ROOT}

# Install Application
RUN chown -R 1001:0 ${APP_ROOT}
USER 1001
WORKDIR ${APP_ROOT}/app
RUN npm ci --omit=dev

EXPOSE ${APP_PORT}
CMD ["npm", "run", "start"]
Loading

0 comments on commit b6adbf4

Please sign in to comment.