-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploying.sh
More file actions
44 lines (43 loc) · 1.14 KB
/
deploying.sh
File metadata and controls
44 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Assume Starting From DevOps_Repo Directory
# Create DevOps_Repo directory
mkdir DevOps_Repo
cd DevOps_Repo
mkdir FrontEndRepo
cd FrontEndRepo
# Clone the FrontEnd repository
git clone https://github.com/Team4-DevWave/Frontend.git
cd Frontend
# Build the Docker image
docker build -t hassanhatem/front:latest .
# Push the Docker image to Docker Hub
docker push hassanhatem/front:latest
cd ..
cd ..
mkdir BackEndRepo
cd BackEndRepo
# Clone the BackEnd repository
git clone https://github.com/Team4-DevWave/Backend.git
cd Backend
# Build the Docker image
docker build -t hassanhatem/back:latest .
# Push the Docker image to Docker Hub
docker push hassanhatem/back:latest
cd ..
cd ..
# Clone the DevOps repository
git clone https://github.com/Team4-DevWave/Devops.git
cd Devops
cd nginx
# Build the Docker image
docker build -t hassanhatem/nginx:latest .
# Push the Docker image to Docker Hub
docker push hassanhatem/nginx:latest
cd ..
# Run the deployment script
# Pull Docker images from Docker Hub
docker pull hassanhatem/front:latest
docker pull hassanhatem/back:latest
docker pull hassanhatem/nginx:latest
# Run Docker Compose
docker-compose up -d