diff --git a/services/install-gitlab.sh b/services/install-gitlab.sh new file mode 100644 index 0000000000..01aa1a52fc --- /dev/null +++ b/services/install-gitlab.sh @@ -0,0 +1,102 @@ +#!/bin/bash + + # runs gitlab on docker +# docker run -d --hostname 192.168.86.47 -p 443:443 -p 80:80 -p 2222:22 --name gitlab -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab --privileged ulm0/gitlab + +function install { + # create service directory + mkdir -p /srv/gitlab + + # create yml(s) + # NEEDS REVIEW FOR FORMATTING + { + echo "version: '3.3'" + echo "services:" + echo " gitlab:" + echo " ports:" + echo " - '443:443'" + echo " - '80:80'" + echo " - '2222:22'" + echo " volumes:" + echo " - '/srv/gitlab/config:/etc/gitlab'" + echo " - '/srv/gitlab/logs:/var/log/gitlab'" + echo " - '/srv/gitlab/data:/var/opt/gitlab'" + echo " privileged: true" + echo " image: ulm0/gitlab" +} > /srv/gitlab/gitlab.yml + + # create .env with default values + + # add autorun + cat << EOF > /srv/gitlab/autorun +gitlab_autorun=true + +if [ "$gitlab_autorun" = true ]; then + treehouses services gitlab up +fi + + +EOF +} + +# environment var + # NEEDS REVIEW FOR ACCURACY +function uses_env { + echo false +} + +# add supported arch(es) + # NEEDS TO BE CHANGED TO GITLAB +function supported_arches { + echo "armv7l" +} + +# add port(s) + # NEEDS REVIEW FOR ACCURACY +function get_ports { + echo "443" + echo "80" + echo "2222" +} + +# add size (in MB) + # NEEDS REVIEW FOR ACCURACY +function get_size { + echo "1982" +} + +# add description +function get_description { + echo "GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking, continuous integration, and deployment pipeline features; all using an open-source license" +} + +# add info + # NEEDS REVIEW FOR FORMATTING +function get_info { + echo "https://github.com/treehouses/gitlab" + echo + echo "\"GitLab is an open core company which" + echo "develops software for the software development lifecycle used by" + echo "more than 100,000 organizations, 30 million estimated registered users," + echo "and has an active community of more than 3000 contributors.\"" +} + +# add svg icon + # NEEDS TO BE CHANGED TO GITLAB +function get_icon { + cat < + + + + + + + + + + + + +EOF +}