Created gitlab installation script
This commit is contained in:
parent
9bca074990
commit
d91bf0e581
1 changed files with 46 additions and 0 deletions
46
gitlab_install.sh
Executable file
46
gitlab_install.sh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$ZFS_DIR" ]
|
||||
then
|
||||
ZFS_DIR=/data
|
||||
fi
|
||||
|
||||
if [ -z "$ADMIN_ACCOUNT"]
|
||||
then
|
||||
ADMIN_ACCOUNT=root
|
||||
fi
|
||||
su ${ADMIN_ACCOUNT}
|
||||
|
||||
GITLAB_HOME=${ZFS_DIR}/gitlab
|
||||
|
||||
GITLAB_ADDRESS=gitlab.adamhome.dev
|
||||
GITLAB_EXTERN_HTTPS=14443
|
||||
GITLAB_EXTERN_HTTP=14080
|
||||
GITLAB_EXTERN_SSH=14022
|
||||
|
||||
sudo docker run --detach \
|
||||
--hostname ${GITLAB_ADDRESS} \
|
||||
--publish ${GITLAB_EXTERN_HTTPS}:443 --publish ${GITLAB_EXTERN_HTTP}:80 --publish ${GITLAB_EXTERN_SSH}:22 \
|
||||
--name gitlab \
|
||||
--restart always \
|
||||
--volume ${GITLAB_HOME}/config:/etc/gitlab \
|
||||
--volume ${GITLAB_HOME}/logs:/var/log/gitlab \
|
||||
--volume ${GITLAB_HOME}/data:/var/opt/gitlab \
|
||||
--shm-size 512m \
|
||||
gitlab/gitlab-ce:latest
|
||||
|
||||
## Uncomment if you want to monitor boot-up
|
||||
# sudo docker logs -f gitlab
|
||||
|
||||
# sudo docker exec -it gitlab /bin/bash
|
||||
# edit /etc/gitlab/gitlab.rb so that gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_EXTERN_SSH}
|
||||
# while still in gitlab env, run gitlab-ctl reconfigure
|
||||
|
||||
sudo docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue