Skip to content

Commit 5030ed5

Browse files
committed
first commit
0 parents  commit 5030ed5

28 files changed

+5785
-0
lines changed

.dockerignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# nyc test coverage
18+
.nyc_output
19+
20+
# TAP files
21+
out.tap
22+
junit-testresults.xml
23+
24+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
25+
.grunt
26+
27+
# node-waf configuration
28+
.lock-wscript
29+
30+
# Dependency directories
31+
node_modules
32+
jspm_packages
33+
# Compiled binary addons (http://nodejs.org/api/addons.html)
34+
build
35+
36+
# Optional npm cache directory
37+
.npm
38+
39+
# Optional REPL history
40+
.node_repl_history
41+
42+
#misc
43+
.DS_Store
44+
.vscode
45+
.env
46+
LICENSE
47+
README.md
48+
.dockerignore
49+
.github/
50+
Dockerfile

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Put your dev env vars here. They will work out of the box for the `dev` script

.eslintignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.sh
2+
node_modules
3+
*.md
4+
*.woff
5+
*.ttf
6+
.vscode
7+
.idea
8+
dist
9+
/public
10+
/docs
11+
.husky
12+
.local
13+
/bin
14+
Dockerfile
15+
/dist

.eslintrc.cjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
ignorePatterns: ['**/*.js', '**/*.mjs', '**/*.cjs'],
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: ['./tsconfig.json', './test/tsconfig.json'],
11+
tsconfigRootDir: './',
12+
},
13+
plugins: ['@typescript-eslint', 'prettier'],
14+
rules: {
15+
'@typescript-eslint/member-delimiter-style': 'off',
16+
'@typescript-eslint/explicit-function-return-type': 'off',
17+
'no-unused-vars': 'off',
18+
'@typescript-eslint/no-unused-vars': ['error'],
19+
},
20+
}

.eslintrc.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true,
6+
es6: true,
7+
},
8+
parser: 'vue-eslint-parser',
9+
parserOptions: {
10+
parser: '@typescript-eslint/parser',
11+
ecmaVersion: 2020,
12+
sourceType: 'module',
13+
jsxPragma: 'React',
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
},
18+
extends: ['plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended'],
19+
rules: {
20+
'@typescript-eslint/ban-ts-ignore': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
'@typescript-eslint/no-var-requires': 'off',
24+
'@typescript-eslint/no-empty-function': 'off',
25+
'vue/custom-event-name-casing': 'off',
26+
'no-use-before-define': 'off',
27+
'@typescript-eslint/no-use-before-define': 'off',
28+
'@typescript-eslint/ban-ts-comment': 'off',
29+
'@typescript-eslint/ban-types': 'off',
30+
'@typescript-eslint/no-non-null-assertion': 'off',
31+
'@typescript-eslint/explicit-module-boundary-types': 'off',
32+
'@typescript-eslint/no-unused-vars': [
33+
'error',
34+
{
35+
argsIgnorePattern: '^_',
36+
varsIgnorePattern: '^_',
37+
},
38+
],
39+
'no-unused-vars': [
40+
'error',
41+
{
42+
argsIgnorePattern: '^_',
43+
varsIgnorePattern: '^_',
44+
},
45+
],
46+
'space-before-function-paren': 'off',
47+
'vue/attributes-order': 'off',
48+
'vue/one-component-per-file': 'off',
49+
'vue/html-closing-bracket-newline': 'off',
50+
'vue/max-attributes-per-line': 'off',
51+
'vue/multiline-html-element-content-newline': 'off',
52+
'vue/singleline-html-element-content-newline': 'off',
53+
'vue/attribute-hyphenation': 'off',
54+
'vue/require-default-prop': 'off',
55+
'vue/script-setup-uses-vars': 'off',
56+
'vue/html-self-closing': [
57+
'error',
58+
{
59+
html: {
60+
void: 'always',
61+
normal: 'never',
62+
component: 'always',
63+
},
64+
svg: 'always',
65+
math: 'always',
66+
},
67+
],
68+
},
69+
}

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
* text=auto
2+
*.js text eol=lf
3+
*.mjs text eol=lf
4+
*.jsx text eol=lf
5+
*.ts text eol=lf
6+
*.tsx text eol=lf
7+
*.json text eol=lf
8+
*.md text eol=lf

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
node_modules/
2+
coverage/
3+
build/
4+
out/
5+
6+
.DS_Store
7+
dist/
8+
dist.zip
9+
tmp/
10+
11+
# local env files
12+
.env.local
13+
.env.*.local
14+
15+
# Log files
16+
npm-debug.log*
17+
yarn-debug.log*
18+
yarn-error.log*
19+
pnpm-debug.log*
20+
21+
mock/data/db.json
22+
23+
cypress/downloads
24+
src/autogen-import.d.ts
25+
src/autogen-components.d.ts
26+
sync.ffs_db

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "drawings"]
2+
path = drawings
3+
url = [email protected]:v3/teogroup-1/pomini-environment/drawings-fe
4+
[submodule "erm"]
5+
path = erm
6+
url = [email protected]:v3/teogroup-1/pomini-environment/erm-fe
7+
[submodule "hello"]
8+
path = hello
9+
url = [email protected]:v3/teogroup-1/pomini-environment/hello-fe
10+
[submodule "horizon"]
11+
path = horizon
12+
url = [email protected]:v3/teogroup-1/pomini-environment/horizon-fe

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers = true

.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/dist/*
2+
.local
3+
.output.js
4+
/node_modules/**
5+
/src/assets/**
6+
7+
**/*.svg
8+
**/*.sh
9+
**/*.md
10+
/public/*
11+
12+
# Ignore all yml files:
13+
*.yml

.prettierrc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"endOfLine": "lf",
5+
"printWidth": 160,
6+
"jsxSingleQuote": true,
7+
"singleAttributePerLine": false,
8+
"bracketSameLine": false,
9+
"bracketSpacing": true,
10+
"quoteProps": "as-needed",
11+
"tabWidth": 2,
12+
"useTabs": false,
13+
"vueIndentScriptAndStyle": true,
14+
"trailingComma": "es5",
15+
"arrowParens": "always",
16+
"insertPragma": false,
17+
"requirePragma": false,
18+
"proseWrap": "never",
19+
"htmlWhitespaceSensitivity": "strict",
20+
"rangeStart": 0,
21+
"overrides": [
22+
{ "files": ["*.yaml", "*.yml"], "options": { "tabWidth": 2, "printWidth": 88 } },
23+
{ "files": ["*.json"], "options": { "printWidth": 200 } }
24+
],
25+
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
26+
"importOrderSeparation": true,
27+
"importOrderSortSpecifiers": true,
28+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
29+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "stylelint.vscode-stylelint", "pkief.material-icon-theme", "vitest.explorer"]
3+
}

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach",
6+
"type": "node",
7+
"request": "attach",
8+
"restart": true,
9+
"address": "localhost",
10+
"sourceMaps": true,
11+
"skipFiles": ["node_modules"],
12+
"port": 9229
13+
},
14+
{
15+
"name": "Attach to Docker",
16+
"type": "node",
17+
"request": "attach",
18+
"restart": true,
19+
"address": "localhost",
20+
"sourceMaps": true,
21+
"skipFiles": ["node_modules"],
22+
"port": 9229,
23+
"localRoot": "${workspaceRoot}",
24+
"remoteRoot": "/home/app/node"
25+
}
26+
]
27+
}

.vscode/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#69aa00",
4+
"activityBar.foreground": "#ffffff",
5+
"activityBar.inactiveForeground": "#00ff73"
6+
},
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.eslint": "explicit",
9+
"source.organizeImports": "explicit"
10+
},
11+
"[javascript]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[typescript]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
16+
},
17+
"[vue]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
},
20+
"git.ignoreLimitWarning": true,
21+
"emmet.includeLanguages": {
22+
"ejs.t": "html"
23+
},
24+
"debug.terminal.clearBeforeReusing": true,
25+
"vue.codeActions.enabled": false,
26+
"typescript.preferences.includePackageJsonAutoImports": "on",
27+
"editor.bracketPairColorization.enabled": true
28+
}

Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM node:18-alpine as build
2+
3+
# adds deps for node-gyp: add if native modules are used
4+
RUN apk update && apk upgrade && apk --no-cache add --virtual builds-deps build-base python3
5+
6+
# set app basepath
7+
ENV HOME=/home/app
8+
9+
# add app dependencies
10+
COPY package.json $HOME/node/
11+
COPY pnpm-lock.yaml $HOME/node/
12+
13+
# change workgin dir and install deps in quiet mode
14+
WORKDIR $HOME/node
15+
16+
RUN npm install -g pnpm
17+
18+
RUN pnpm install --frozen-lockfile
19+
20+
# copy all app files
21+
COPY . $HOME/node/
22+
23+
# compile typescript and build all production stuff
24+
RUN pnpm run build
25+
26+
# remove dev dependencies and files that are not needed in production
27+
RUN rm -rf node_modules
28+
RUN pnpm install --only=prod
29+
RUN pnpm prune --production
30+
31+
# start new image for lower size
32+
FROM node:18-alpine
33+
34+
# dumb-init registers signal handlers for every signal that can be caught
35+
RUN apk update && apk add --no-cache dumb-init
36+
37+
# create use with no permissions
38+
RUN addgroup -g 101 -S app && adduser -u 100 -S -G app -s /bin/false app
39+
40+
# set app basepath
41+
ENV HOME=/home/app
42+
43+
# copy production complied node app to the new image
44+
COPY --chown=app:app --from=build $HOME/node/ $HOME/node/
45+
46+
# run app with low permissions level user
47+
USER app
48+
WORKDIR $HOME/node
49+
50+
EXPOSE 3000
51+
52+
ENV NODE_ENV=production
53+
54+
ENTRYPOINT ["dumb-init"]
55+
CMD ["node", "--enable-source-maps", "build/index.js"]

0 commit comments

Comments
 (0)