Last active
January 15, 2020 07:26
-
-
Save mhewedy/a2bd21cdf0f7c5619d91806fb8eabf2c to your computer and use it in GitHub Desktop.
cheap feature branch deploy
This file contains 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
#script to make ad-hoc cheap deploy for a git feature-branch | |
input: ubuntu machine IP & root username&password (EC2 or Digitalocean VM) | |
input will be saved in the github/bitbucet variables and referenced by varname | |
1. scp docker-compose file for dependent services (e.g. db) to the remote server | |
2. scp docker file + the artifact (e.g. war file) to the remote server | |
3. run the following on remote server (ssh) | |
a. install docker & docker-compose | |
b. run docker-compose file, make sure sevices start on uniq ports | |
c. build docker image | |
e. run docker image make sure the app start on uniq port (>= 8080) | |
4. print the IP/PORT for the running service | |
------ OUTPUT ------ | |
running app instance with empty database | |
TODO: the cleanup script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment