diff --git a/docker/docker.md b/docker/docker.md new file mode 100644 index 00000000..76fb2830 --- /dev/null +++ b/docker/docker.md @@ -0,0 +1,2 @@ +https://hub.docker.com/r/thilinah/icehrm/ +docker run -i -t -p 192.168.99.100:80:80 thilinah/icehrm /bin/start.sh \ No newline at end of file diff --git a/docker/start.sh b/docker/start.sh new file mode 100644 index 00000000..3b680be5 --- /dev/null +++ b/docker/start.sh @@ -0,0 +1,30 @@ +#!/bin/bash +service nginx start +service php5-fpm start +service mysql start + +if [ -d "/usr/share/nginx/www/" ]; then + echo 'Already Installed' +else + echo 'Installing IceHrm' + cd /usr/share/nginx + curl -s https://api.github.com/repos/gamonoid/icehrm/releases/latest | jq -r ".assets[] | select(.name) | .browser_download_url" | grep '.zip' | xargs wget + ls | grep 'zip' | xargs unzip + mv `ls -d */ | grep icehrm | head -1` www/ + rm *.zip + + echo 'Your MySQL root password : icehrmpwd' + + echo "Following will be needed during installation" + echo "--------------------------------------------" + echo 'IceHrm Database : icehrmdb' + echo 'IceHrm User : icehrmuser' + echo 'IceHrm User Password : icehrmuserpwd' + echo 'IceHrm Database host : localhost' + + echo 'Please visit your docker installation url to begin installation.' + +fi + + +/bin/bash \ No newline at end of file