Advertisement
Sergio_Istea

deploy-app-from-git.sh

Nov 9th, 2021
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. mkdir -p $HOME/apps
  4.  
  5. read -p "Nombre de la app: " appname
  6. read -p "Puerto de escucha: " port
  7. read -p "Repositorio de la app: " gitrepo
  8.  
  9. git clone $gitrepo $HOME/apps/$appname
  10.  
  11.  
  12. docker run -d --name $appname -p $port:80 -v ${HOME}/apps/$appname:/usr/share/nginx/html:ro nginx
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement