Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

creat yaml file #623

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
bc9bb96
extracting the search button from search.js
Mohammedal-abdulhamid Oct 13, 2021
3285a32
extract the Header out of APP component
Mohammedal-abdulhamid Oct 13, 2021
7080509
finish all cards with their content
Mohammedal-abdulhamid Oct 13, 2021
8aba90d
Footer element not completed
Mohammedal-abdulhamid Oct 13, 2021
36c4746
adding Footer element
Mohammedal-abdulhamid Oct 13, 2021
e1f5fee
finishing search result component
Mohammedal-abdulhamid Oct 16, 2021
fbb2368
finish lesson 1
Mohammedal-abdulhamid Oct 24, 2021
07b31e0
Render the Restaurant component
Mohammedal-abdulhamid Oct 24, 2021
d8ef542
Preparing to add more pizzas && Add more pizzas
Mohammedal-abdulhamid Oct 24, 2021
c09293a
up to level 2
Mohammedal-abdulhamid Nov 18, 2021
364af1d
adding logo
Mohammedal-abdulhamid Apr 20, 2022
ec2ba84
search fanctionality
Mohammedal-abdulhamid Apr 26, 2022
64ca8ba
show customer profile 1&2 requirements
Mohammedal-abdulhamid Apr 28, 2022
500ee78
improve fanctionalaty and apply responsive styling
Mohammedal-abdulhamid May 2, 2022
9c24bf9
change clicked row style
Mohammedal-abdulhamid May 2, 2022
ff39f52
modifying different component
Jan 19, 2024
b259608
fix
Jan 20, 2024
54b48b8
fix merge
Jan 20, 2024
2e11d75
fix booking data url, add loading feature
Jan 20, 2024
a1c5ce5
modify booking, search,searchResult
Jan 20, 2024
717ffe3
add styling
Jan 20, 2024
02951cb
fix place holder
Jan 20, 2024
3f5f8bf
setup server and databse
Jan 22, 2024
e7a9684
fix search function
Jan 22, 2024
90c3e8b
server & connection & database
Jan 23, 2024
926245b
fix search function
Jan 23, 2024
fae8251
modify server and connection
Jan 25, 2024
405d242
modyfy some files
Jan 27, 2024
f5b6e4d
watch package
Jan 27, 2024
9d25fff
Create main.yml
Mohammedal-abdulhamid Jan 31, 2024
4cfcf2b
Update main.yml
Mohammedal-abdulhamid Jan 31, 2024
890f679
port
Feb 1, 2024
2455718
Delete .github/workflows/main.yml
Mohammedal-abdulhamid Feb 1, 2024
2e2ce8f
Merge branch 'master' of https://github.com/Mohammedal-abdulhamid/cyf…
Feb 1, 2024
ba30827
Create main.yaml
Mohammedal-abdulhamid Feb 1, 2024
bfb8dfc
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
07b923d
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
fe49c40
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
ad64d6f
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
0c47e03
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
6a52b46
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
ade1329
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
691dc6e
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
f4ab4cf
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
9ec3220
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
f854f98
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
c0f87c0
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
5e57398
Update main.yaml
Mohammedal-abdulhamid Feb 1, 2024
71b6294
Update main.yaml
Mohammedal-abdulhamid Feb 2, 2024
8a8319b
remove deploy
Feb 2, 2024
58febe9
Merge branch 'master' of https://github.com/Mohammedal-abdulhamid/cyf…
Feb 2, 2024
7a26427
Update main.yaml
Mohammedal-abdulhamid Feb 2, 2024
55c2ae4
Update main.yaml
Mohammedal-abdulhamid Feb 2, 2024
e245e7a
jason
Feb 2, 2024
52ab4da
Merge branch 'master' of https://github.com/Mohammedal-abdulhamid/cyf…
Feb 2, 2024
9a2511a
deploy script
Feb 2, 2024
f3eb435
dev script
Feb 2, 2024
15e23f1
dev script
Feb 2, 2024
c854c76
Update main.yaml
Mohammedal-abdulhamid Feb 2, 2024
9b2210f
Create backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
71e79bc
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
a76e26e
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
5486273
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
c4a38b0
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
bf2a07d
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
12a7a9b
Update backend-ec2-deploy.yml
Mohammedal-abdulhamid Feb 2, 2024
f5df073
delet yaml
Feb 2, 2024
b637cf8
Create node.js.yml
Mohammedal-abdulhamid Feb 2, 2024
89940b7
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
a3de304
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
fc81098
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
ffea34a
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
9885c27
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
0760175
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
48a5353
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
4615bd6
Update node.js.yml
Mohammedal-abdulhamid Feb 3, 2024
5e3358b
test database
Feb 6, 2024
5d240dd
fix remote database connection
Feb 8, 2024
e712d78
Update node.js.yml
Mohammedal-abdulhamid Feb 8, 2024
8ceecbb
Update node.js.yml
Mohammedal-abdulhamid Feb 9, 2024
754d255
Update node.js.yml
Mohammedal-abdulhamid Feb 9, 2024
c387c25
create docker file
Feb 10, 2024
9dcda46
Merge branch 'master' of https://github.com/Mohammedal-abdulhamid/cyf…
Feb 10, 2024
468d27b
Update node.js.yml
Mohammedal-abdulhamid Feb 10, 2024
73dec2f
Update node.js.yaml
Mohammedal-abdulhamid Feb 12, 2024
c776a1a
Update node.js.yaml
Mohammedal-abdulhamid Feb 12, 2024
5b82111
Update node.js.yml
Mohammedal-abdulhamid Feb 12, 2024
ed61dca
modify dockerignore
Feb 12, 2024
ea64f0a
Merge branch 'master' of https://github.com/Mohammedal-abdulhamid/cyf…
Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
51 changes: 51 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI/CD Pipeline

on:
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install

- name: Run tests
run: npm test

deploy:

needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Dependencies
run: npm install

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install AWS CLI
run: npm install -g aws-cli


- name: Configure AWS credentials
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set region eu-west-2

- name: Create build folder
run: npm run build

- name: Deploy to S3
run: aws s3 sync build/ s3://cyfhotelapp

47 changes: 47 additions & 0 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Deploy and Docker Build

on:
push:
branches: [ "master" ]

jobs:
deploy-and-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Build application
run: npm run build
- name: Check SSH connection run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} echo "SSH connection successful"
- name: Deploy via rsync run: | rsync -avz --delete -e "ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no" ./source_directory ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:/destination_directory

- name: Deploy via SSH
uses: easingthemes/ssh-deploy@v4
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.EC2_HOST }}
REMOTE_USER: ${{ secrets.EC2_USERNAME }}
TARGET: "./cyf-hotel-react"

- name: Build Docker image
run: |
docker build -t cyfhotelapp-docker-image:latest .
docker tag cyfhotelapp-docker-image:latest ${{ secrets.AWS_ECR_URI }}/cyfhotelapp-docker-image:latest
docker push ${{ secrets.AWS_ECR_URI }}/cyfhotelapp-docker-image:latest
env:
AWS_ECR_URI: ${{ secrets.AWS_ECR_URI }}


5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
# production
/build

.SKIP_PREFLIGHT_CHECK=true

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.env

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.gitignore
Binary file added AWSCLIV2.pkg
Binary file not shown.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18-alpine

WORKDIR /app

COPY package*.json .

RUN npm install

COPY . .

EXPOSE 4001

CMD ["npm","run","dev"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ Packages contain new functions and properties to work with that may not be avail

Think about some of the code you have written in this lesson - are there any packages available that might have helped you to complete the exercises?

For example, exercise 26 and 27 used validation. Searching npmjs.com for '[validate](https://www.npmjs.com/search?q=validate)' shows multiple packages, such as '[validator](https://www.npmjs.com/package/validator)' and '[Validate](https://www.npmjs.com/package/Validate)'. Open both of these packages in your browser, and consider the following questions:
For exampHle, exercise 26 and 27 used validation. Searching npmjs.com for '[validate](https://www.npmjs.com/search?q=validate)' shows multiple packages, such as '[validator](https://www.npmjs.com/package/validator)' and '[Validate](https://www.npmjs.com/package/Validate)'. Open both of these packages in your browser, and consider the following questions:
- Is it clear what this package does? Will it solve my specific problem better than writing my own code?
- Do I trust that the code in this package is safe to run on my machine? Do other people trust this package? (Hint: look at weekly downloads, last update, dependents, and visit the repository)
- Is this package accessible? Will it work on all browsers?
Expand Down
File renamed without changes.
Loading