Skip to content

Commit

Permalink
Added deployment 8
Browse files Browse the repository at this point in the history
  • Loading branch information
theoafactor committed Dec 6, 2024
1 parent 6afef73 commit 49e9912
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
jobs:
app_deployment:
runs-on: ubuntu-latest
env:
IMAGE_VERSION: "1123"
IMAGE_USERNAME: theoafactor
steps:
- name: 'Checkout the repo'
uses: actions/checkout@v4
Expand All @@ -30,6 +33,27 @@ jobs:
ssh -o StrictHostKeyChecking=no -i ssh_key [email protected] '
sudo apt-get update
## install docker
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
## pull the image into the EC2 instance
sudo docker pull theoafactor/booksfinder:1123
sudo docker run -d -p 80:80 theoafactor/booksfinder:1123
'
1 change: 1 addition & 0 deletions ssh_test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test

0 comments on commit 49e9912

Please sign in to comment.