Skip to content

Instantly share code, notes, and snippets.

@shreyas90999
Last active January 6, 2022 07:11
Show Gist options
  • Save shreyas90999/078d2a84c85cc954ada08ac3909be61d to your computer and use it in GitHub Desktop.
Save shreyas90999/078d2a84c85cc954ada08ac3909be61d to your computer and use it in GitHub Desktop.
bitbucket deploy to VM
# This is a sample build configuration for docker app
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ubuntu
pipelines:
default:
- step:
name: Building Application
script:
- echo "Building Application"
- step:
name: Unit Testing
script:
- echo "Unit Testing"
- step:
name: Deploy to EC2
script:
- apt-get update && apt-get install -y unzip
- apt-get install -y ssh
- ssh [user]@[IP of VM] 'bash -s' < execute.sh
cd [Repo Name]
git pull
sudo docker-compose down
sudo docker-compose build
sudo docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment