Skip to content

Commit

Permalink
add the files for code deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
iam-veeramalla authored Jul 18, 2023
1 parent 0d11984 commit 5f3c8b1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 0.0
os: linux

hooks:
ApplicationStop:
- location: scripts/stop_container.sh
timeout: 300
runas: root
AfterInstall:
- location: scripts/start_container.sh
timeout: 300
runas: root
8 changes: 8 additions & 0 deletions scripts/start_container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

# Pull the Docker image from Docker Hub
docker pull abhishekf5/simple-python-flask-app

# Run the Docker image as a container
docker run -d -p 5000:5000 abhishekf5/simple-python-flask-app
5 changes: 5 additions & 0 deletions scripts/stop_container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

# Stop the running container (if any)
echo "Hi"

0 comments on commit 5f3c8b1

Please sign in to comment.