forked from unkbot/whaticket-free
-
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.
- Loading branch information
0 parents
commit e34bf40
Showing
421 changed files
with
28,524 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# MYSQL | ||
MYSQL_ENGINE= | ||
MYSQL_VERSION= | ||
MYSQL_ROOT_PASSWORD= | ||
MYSQL_DATABASE=whaticket | ||
MYSQL_PORT= | ||
TZ= | ||
|
||
# BACKEND | ||
BACKEND_PORT= | ||
BACKEND_SERVER_NAME=api.mydomain.com | ||
BACKEND_URL=https://api.mydomain.com | ||
PROXY_PORT=443 | ||
JWT_SECRET= | ||
JWT_REFRESH_SECRET= | ||
|
||
# FRONTEND | ||
FRONTEND_PORT=80 | ||
FRONTEND_SSL_PORT=443 | ||
FRONTEND_SERVER_NAME=myapp.mydomain.com | ||
FRONTEND_URL=https://myapp.mydomain.com | ||
|
||
# BROWSERLESS | ||
MAX_CONCURRENT_SESSIONS= | ||
|
||
# PHPMYADMIN | ||
PMA_PORT= |
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,26 @@ | ||
# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli) | ||
# Visit https://fossa.com to learn more | ||
|
||
version: 2 | ||
cli: | ||
server: https://app.fossa.com | ||
fetcher: custom | ||
project: https://github.com/canove/whaticket.git | ||
analyze: | ||
modules: | ||
- name: backend | ||
type: npm | ||
target: backend | ||
path: backend | ||
- name: backend | ||
type: npm | ||
target: backend | ||
path: backend | ||
- name: frontend | ||
type: npm | ||
target: frontend | ||
path: frontend | ||
- name: frontend | ||
type: npm | ||
target: frontend | ||
path: frontend |
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 @@ | ||
.docker/data/ | ||
ssl/ | ||
.env |
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 @@ | ||
sonar.exclusions=frontend/src/translate/languages/*,**/__tests__/**/* |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 canove | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# WhaTicket |
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,5 @@ | ||
.git | ||
*Dockerfile* | ||
*docker-compose* | ||
node_modules | ||
dist |
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,9 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,18 @@ | ||
NODE_ENV= | ||
BACKEND_URL=http://localhost | ||
FRONTEND_URL=http://localhost:3000 | ||
PROXY_PORT=8080 | ||
PORT=8080 | ||
|
||
DB_DIALECT= | ||
DB_HOST= | ||
DB_USER= | ||
DB_PASS= | ||
DB_NAME= | ||
|
||
JWT_SECRET= | ||
JWT_REFRESH_SECRET= | ||
|
||
REDIS_URI= | ||
REDIS_OPT_LIMITER_MAX=1 | ||
REDIS_OPT_LIMITER_DURATION=3000 |
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 @@ | ||
/*.js | ||
node_modules | ||
dist |
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,50 @@ | ||
{ | ||
"env": { | ||
"es2021": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
"consistent-return": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ "argsIgnorePattern": "_" } | ||
], | ||
"import/prefer-default-export": "off", | ||
"no-console": "off", | ||
"no-param-reassign": "off", | ||
"prettier/prettier": "error", | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"ts": "never" | ||
} | ||
], | ||
"quotes": [ | ||
1, | ||
"double", | ||
{ | ||
"avoidEscape": true | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"typescript": {} | ||
} | ||
} | ||
} |
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,16 @@ | ||
node_modules | ||
public/* | ||
dist | ||
!public/.gitkeep | ||
.env | ||
.env.test | ||
|
||
package-lock.json | ||
yarn.lock | ||
yarn-error.log | ||
|
||
/src/config/sentry.js | ||
|
||
# Ignore test-related files | ||
/coverage.data | ||
/coverage/ |
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,8 @@ | ||
const { resolve } = require("path"); | ||
|
||
module.exports = { | ||
"config": resolve(__dirname, "dist", "config", "database.js"), | ||
"modules-path": resolve(__dirname, "dist", "models"), | ||
"migrations-path": resolve(__dirname, "dist", "database", "migrations"), | ||
"seeders-path": resolve(__dirname, "dist", "database", "seeds") | ||
}; |
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,40 @@ | ||
FROM node:14 as build-deps | ||
|
||
RUN apt-get update && apt-get install -y wget | ||
|
||
ENV DOCKERIZE_VERSION v0.6.1 | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y wget gnupg \ | ||
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | ||
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ | ||
&& apt-get update \ | ||
&& apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ | ||
--no-install-recommends \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 /usr/local/bin/dumb-init | ||
RUN chmod +x /usr/local/bin/dumb-init | ||
|
||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
|
||
WORKDIR /usr/src/app | ||
COPY package*.json ./ | ||
RUN npm install | ||
|
||
COPY . . | ||
RUN npm run build | ||
|
||
ENV NODE_ENV=production | ||
ENV PORT=3000 | ||
ENV CHROME_BIN=google-chrome-stable | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["dumb-init", "--"] | ||
CMD dockerize -wait tcp://${DB_HOST}:3306 \ | ||
&& npx sequelize db:migrate \ | ||
&& node dist/server.js |
Oops, something went wrong.