-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from fdhhhdjd/developer
#172 [Devops] Setup Frontend CMS
- Loading branch information
Showing
106 changed files
with
43,966 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,19 @@ | ||
# git | ||
.git | ||
|
||
# Forder run code | ||
node_modules | ||
|
||
# Docker | ||
Dockerfile | ||
.dockerignore | ||
|
||
# File unit test | ||
./src/tests | ||
|
||
# Fotmatcode | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.prettierignore | ||
.prettierrc |
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,14 @@ | ||
# https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
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,30 @@ | ||
################## SETTING MAIN ################### | ||
REACT_APP_API_URL=REACT_APP_API_URL | ||
|
||
NODE_ENV=NODE_ENV | ||
|
||
REACT_APP_KEY_FACEBOOK=REACT_APP_KEY_FACEBOOK | ||
REACT_APP_KEY_FACEBOOK_TEST=REACT_APP_KEY_FACEBOOK_TEST | ||
|
||
REACT_APP_KEY_GOOGLE=REACT_APP_KEY_GOOGLE | ||
|
||
REACT_APP_KEY_RECAPTCHA=REACT_APP_KEY_RECAPTCHA | ||
|
||
REACT_APP_KEY_RECAPTCHA_V3=REACT_APP_KEY_RECAPTCHA_V3 | ||
|
||
REACT_APP_KEY_GOOGLE_MAP=REACT_APP_KEY_GOOGLE_MAP | ||
|
||
REACT_APP_KEY_GOOGLE_MAP_MAIN=REACT_APP_KEY_GOOGLE_MAP_MAIN | ||
|
||
REACT_APP_GOOGLE_LAT=REACT_APP_GOOGLE_LAT | ||
REACT_APP_GOOGLE_LNG=REACT_APP_GOOGLE_LNG | ||
|
||
|
||
################## Config Firebase ################### | ||
REACT_APP_API_KEY=REACT_APP_API_KEY | ||
REACT_APP_AUTH_DOMAIN=REACT_APP_AUTH_DOMAIN | ||
REACT_APP_DATA_BASE_URL=REACT_APP_DATA_BASE_UR | ||
REACT_APP_PROJECT_ID=REACT_APP_PROJECT_ID | ||
REACT_APP_STORAGE_BUCKET=REACT_APP_STORAGE_BUCKET | ||
REACT_APP_MESSAGING_SENDER_ID=REACT_APP_MESSAGING_SENDER_ID | ||
REACT_APP_APP_ID=REACT_APP_APP_ID |
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 @@ | ||
build/*.js | ||
src/assets | ||
src/main.js | ||
public | ||
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,35 @@ | ||
{ | ||
"extends": ["react-app", "react-app/jest", "prettier"], | ||
"plugins": ["react", "eslint-plugin-prettier", "prettier"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"js": true, | ||
"modules": true | ||
} | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"warn", | ||
{ | ||
"arrowParens": "always", | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 120, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false | ||
} | ||
] | ||
} | ||
} |
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,11 @@ | ||
# Forder run code | ||
node_modules | ||
|
||
# Environment | ||
.env | ||
|
||
# Build source | ||
build | ||
|
||
# husky | ||
.husky |
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 @@ | ||
package.json | ||
package-lock.json | ||
build |
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,20 @@ | ||
{ | ||
"arrowParens": "always", | ||
"bracketSameLine": false, | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto", | ||
"htmlWhitespaceSensitivity": "css", | ||
"insertPragma": false, | ||
"jsxSingleQuote": false, | ||
"printWidth": 120, | ||
"proseWrap": "preserve", | ||
"quoteProps": "as-needed", | ||
"requirePragma": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false, | ||
"vueIndentScriptAndStyle": false, | ||
"endOfLine": "auto" | ||
} |
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,14 @@ | ||
### STAGE 1: Build ### | ||
FROM node:14-alpine as builder | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
|
||
### STAGE 2: Production Environment ### | ||
FROM nginx:1.9.15-alpine | ||
COPY --from=builder /app/build /usr/share/nginx/html | ||
COPY --from=builder /app/nginx/nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 3000 | ||
CMD ["nginx", "-g", "daemon off;"] |
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,13 @@ | ||
FROM node:14-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3001 | ||
|
||
CMD [ "npm", "start" ] |
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) 2022 Nguyễn Tiến Tài | ||
|
||
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,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es6", | ||
"baseUrl": "./src", | ||
"paths": { | ||
"./*": ["src/*"] | ||
} | ||
}, | ||
"include": ["src/**/*", "tests"], | ||
"exclude": ["node_modules", "build"] | ||
} |
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,7 @@ | ||
# Run Frontend dev | ||
run-dev: | ||
npm run dev | ||
|
||
# Run Production | ||
run-product: | ||
npm start |
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 @@ | ||
server{ | ||
listen 3000; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
Oops, something went wrong.