Last active
January 6, 2022 07:11
-
-
Save shreyas90999/078d2a84c85cc954ada08ac3909be61d to your computer and use it in GitHub Desktop.
bitbucket deploy to VM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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