diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 6aa064e6b..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - env: { - browser: true, - commonjs: true, - }, - extends: [ - 'airbnb', - 'plugin:react/recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - ecmaVersion: 2018, - sourceType: 'module', - }, - plugins: ['react', '@typescript-eslint'], - rules: { - '@typescript-eslint/explicit-module-boundary-types': 'off', - 'import/prefer-default-export': 0, - 'prettier/prettier': 0, - 'import/extensions': 0, - 'no-use-before-define': 0, - 'import/no-unresolved': 0, - 'import/no-extraneous-dependencies': 0, - 'no-shadow': 0, - 'react/prop-types': 0, - 'jsx-a11y/label-has-associated-control': 'off', - 'react/jsx-filename-extension': [ - 2, - { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, - ], - 'jsx-a11y/no-noninteractive-element-interactions': 0, - }, -}; diff --git a/.github/workflows/deploy-prod-fe.yml b/.github/workflows/deploy-prod-fe.yml new file mode 100644 index 000000000..8ce46370b --- /dev/null +++ b/.github/workflows/deploy-prod-fe.yml @@ -0,0 +1,70 @@ +name: 프론트 운영 CD + +on: + push: + branches: [deploy-fe] + +jobs: + buildAndDeploy: + name: 프론트 운영 CD + runs-on: ubuntu-18.04 + defaults: + run: + shell: bash + env: + zip-name: airbnb-fe.zip + working-directory: ./FE + node-version: 16.13.1 + + steps: + - name: 체크아웃 Github-Action + uses: actions/checkout@v3 + - name: Use Node.js ${{ env.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.node-version }} + - run: npm ci + working-directory: ${{ env.working-directory }} + + - run: npm run build --if-present + working-directory: ${{ env.working-directory }} + + - name: Docker Buildx 준비 + uses: docker/setup-buildx-action@v1 + + - name: Github Container Registry 에 로그인 + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_ACCESS_KEY }} +# working-directory: ${{ env.working-directory }} + - name: 이미지 빌드 및 푸시 + uses: docker/build-push-action@v2 + with: + context: ${{ env.working-directory }} + file: ${{ env.working-directory }}/Dockerfile + push: true + tags: + ghcr.io/${{ github.repository_owner }}/airbnb-fe:latest + + - name: airbnb-deploy.zip 생성 + run: zip -r ./${{ env.zip-name }} ./scripts ./appspec.yml + working-directory: ${{ env.working-directory }} + + - name: AWS Credential 설정 + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ap-northeast-2 + + - name: AWS S3 로 업로드 + run: aws s3 cp --region ap-northeast-2 ./${{ env.zip-name }} s3://airbnb-s3-bucket-deploy/${{ env.zip-name }} + working-directory: ${{ env.working-directory }} + + - name: AWS CodeDeploy 배포 실행 + run: aws deploy create-deployment + --application-name airbnb-deploy + --deployment-group airbnb-fe-dg + --s3-location bucket=airbnb-s3-bucket-deploy,key=${{ env.zip-name }},bundleType=zip \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b512c09d4..000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index f47cbf778..000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - singleQuote: true, - semi: true, - useTabs: false, - tabWidth: 2, - trailingComma: 'all', - printWidth: 80, - arrowParens: 'avoid', - endOfLine: 'auto', -}; diff --git a/FE/.gitignore b/FE/.gitignore index 4d29575de..8b182cf84 100644 --- a/FE/.gitignore +++ b/FE/.gitignore @@ -21,3 +21,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* + +.env diff --git a/FE/Dockerfile b/FE/Dockerfile new file mode 100644 index 000000000..ac448413f --- /dev/null +++ b/FE/Dockerfile @@ -0,0 +1,14 @@ +FROM node:16.13.1 + +# 소스 이동 +COPY . /app +WORKDIR /app + +# npm install 설정 +RUN \ + npm install -g serve + +# 3000 포트 허용 +EXPOSE 3000 + +CMD ["serve", "-s", "build"] diff --git a/FE/appspec.yml b/FE/appspec.yml new file mode 100644 index 000000000..4149618da --- /dev/null +++ b/FE/appspec.yml @@ -0,0 +1,20 @@ +version: 0.0 +os: linux +files: + - source: / + destination: /home/ec2-user/app-fe + overwrite: yes + +permissions: + - object: / + pattern: "**" + owner: ec2-user + group: ec2-user + +hooks: + AfterInstall: + + ApplicationStart: + - location: scripts/deploy.sh + timeout: 300 + runas: root diff --git a/FE/package-lock.json b/FE/package-lock.json index 65dfe10f9..cc5b932a9 100644 --- a/FE/package-lock.json +++ b/FE/package-lock.json @@ -29705,4 +29705,4 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } -} +} \ No newline at end of file diff --git a/FE/package.json b/FE/package.json index f8d2cb4f3..4e59352d2 100644 --- a/FE/package.json +++ b/FE/package.json @@ -9,15 +9,6 @@ "@mui/material": "^5.8.1", "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest", "@mui/styled-engine-sc": "^5.8.0", - "@testing-library/jest-dom": "^5.16.4", - "@testing-library/react": "^13.2.0", - "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.1", - "@types/node": "^16.11.36", - "@types/react": "^18.0.9", - "@types/react-dom": "^18.0.5", - "react": "^18.1.0", - "react-dom": "^18.1.0", "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "styled-components": "^5.3.5", @@ -50,6 +41,15 @@ ] }, "devDependencies": { + "@testing-library/jest-dom": "^5.16.4", + "@testing-library/react": "^13.2.0", + "@testing-library/user-event": "^13.5.0", + "@types/jest": "^27.5.1", + "@types/node": "^16.11.36", + "@types/react": "^18.0.9", + "@types/react-dom": "^18.0.5", + "react": "^18.1.0", + "react-dom": "^18.1.0", "@types/styled-components": "^5.1.25", "@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/parser": "^5.26.0", @@ -65,4 +65,4 @@ "resolutions": { "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest" } -} +} \ No newline at end of file diff --git a/FE/public/assets/images/Rectangle 2-1.png b/FE/public/assets/images/Rectangle 2-1.png new file mode 100644 index 000000000..7724c9847 Binary files /dev/null and b/FE/public/assets/images/Rectangle 2-1.png differ diff --git a/FE/public/assets/images/Rectangle 2-2.png b/FE/public/assets/images/Rectangle 2-2.png new file mode 100644 index 000000000..4200c1407 Binary files /dev/null and b/FE/public/assets/images/Rectangle 2-2.png differ diff --git a/FE/public/assets/images/Rectangle 2-3.png b/FE/public/assets/images/Rectangle 2-3.png new file mode 100644 index 000000000..6f884b37d Binary files /dev/null and b/FE/public/assets/images/Rectangle 2-3.png differ diff --git a/FE/public/assets/images/Rectangle 2.png b/FE/public/assets/images/Rectangle 2.png new file mode 100644 index 000000000..591a86467 Binary files /dev/null and b/FE/public/assets/images/Rectangle 2.png differ diff --git a/FE/public/assets/images/img-1.png b/FE/public/assets/images/img-1.png new file mode 100644 index 000000000..4cc184ac4 Binary files /dev/null and b/FE/public/assets/images/img-1.png differ diff --git a/FE/public/assets/images/img-2.png b/FE/public/assets/images/img-2.png new file mode 100644 index 000000000..eb4bc4836 Binary files /dev/null and b/FE/public/assets/images/img-2.png differ diff --git a/FE/public/assets/images/img-3.png b/FE/public/assets/images/img-3.png new file mode 100644 index 000000000..c619211d8 Binary files /dev/null and b/FE/public/assets/images/img-3.png differ diff --git a/FE/public/assets/images/img-4.png b/FE/public/assets/images/img-4.png new file mode 100644 index 000000000..f13c831a8 Binary files /dev/null and b/FE/public/assets/images/img-4.png differ diff --git a/FE/public/assets/images/img-5.png b/FE/public/assets/images/img-5.png new file mode 100644 index 000000000..05aabc631 Binary files /dev/null and b/FE/public/assets/images/img-5.png differ diff --git a/FE/public/assets/images/img-6.png b/FE/public/assets/images/img-6.png new file mode 100644 index 000000000..fdab01f36 Binary files /dev/null and b/FE/public/assets/images/img-6.png differ diff --git a/FE/public/assets/images/img-7.png b/FE/public/assets/images/img-7.png new file mode 100644 index 000000000..4f6dcd7d9 Binary files /dev/null and b/FE/public/assets/images/img-7.png differ diff --git a/FE/public/assets/images/img.png b/FE/public/assets/images/img.png new file mode 100644 index 000000000..ec4c64d26 Binary files /dev/null and b/FE/public/assets/images/img.png differ diff --git a/FE/public/assets/images/minuse-off.svg b/FE/public/assets/images/minuse-off.svg new file mode 100644 index 000000000..46bf92fd9 --- /dev/null +++ b/FE/public/assets/images/minuse-off.svg @@ -0,0 +1,4 @@ + diff --git a/FE/public/assets/images/minuse.svg b/FE/public/assets/images/minuse.svg new file mode 100644 index 000000000..8f8ea5c5c --- /dev/null +++ b/FE/public/assets/images/minuse.svg @@ -0,0 +1,4 @@ + diff --git a/FE/public/assets/images/pluse-off.svg b/FE/public/assets/images/pluse-off.svg new file mode 100644 index 000000000..6ad8b206a --- /dev/null +++ b/FE/public/assets/images/pluse-off.svg @@ -0,0 +1,5 @@ + diff --git a/FE/public/assets/images/pluse.svg b/FE/public/assets/images/pluse.svg new file mode 100644 index 000000000..42c01dff3 --- /dev/null +++ b/FE/public/assets/images/pluse.svg @@ -0,0 +1,5 @@ + diff --git a/FE/public/assets/images/thumbnail.png b/FE/public/assets/images/thumbnail.png new file mode 100644 index 000000000..7a283ed1a Binary files /dev/null and b/FE/public/assets/images/thumbnail.png differ diff --git a/FE/public/index.html b/FE/public/index.html index 22b29c6b2..bf917da16 100644 --- a/FE/public/index.html +++ b/FE/public/index.html @@ -15,6 +15,10 @@ type="image/x-icon" href="https://a0.muscache.com/airbnb/static/logotype_favicon-21cc8e6c6a2cca43f061d2dcabdf6e58.ico" /> +