configure nginx
This commit is contained in:
parent
8312c51259
commit
e57c0f6ce7
3 changed files with 20 additions and 6 deletions
1
debian/conf/gitlab-debian.conf
vendored
1
debian/conf/gitlab-debian.conf
vendored
|
@ -9,3 +9,4 @@ export gitlab_nginx_log=/var/log/gitlab
|
||||||
export gitlab_ssl_path=/etc/gitlab/ssl
|
export gitlab_ssl_path=/etc/gitlab/ssl
|
||||||
export gitlab_shell_root=/usr/share/gitlab-shell
|
export gitlab_shell_root=/usr/share/gitlab-shell
|
||||||
export gitlab_shell_log=/var/log/gitlab-shell
|
export gitlab_shell_log=/var/log/gitlab-shell
|
||||||
|
export nginx_conf_example=/usr/share/doc/gitlab/nginx.conf.example
|
||||||
|
|
1
debian/gitlab.docs
vendored
1
debian/gitlab.docs
vendored
|
@ -1,2 +1,3 @@
|
||||||
README.md
|
README.md
|
||||||
debian/README.Debian
|
debian/README.Debian
|
||||||
|
debian/conf/nginx.conf.example
|
||||||
|
|
24
debian/postinst
vendored
24
debian/postinst
vendored
|
@ -31,7 +31,8 @@ case "$1" in
|
||||||
# Show debconf questions
|
# Show debconf questions
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
. /etc/gitlab/gitlab-debian.conf
|
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
|
||||||
|
. ${gitlab_debian_conf}
|
||||||
. /usr/lib/gitlab/scripts/adduser.sh
|
. /usr/lib/gitlab/scripts/adduser.sh
|
||||||
gitlab_repo_path=${gitlab_data_dir}/repositories
|
gitlab_repo_path=${gitlab_data_dir}/repositories
|
||||||
mkdir -p ${gitlab_repo_path}
|
mkdir -p ${gitlab_repo_path}
|
||||||
|
@ -50,13 +51,24 @@ case "$1" in
|
||||||
db_get gitlab/fqdn
|
db_get gitlab/fqdn
|
||||||
if [ "${RET}" != "" ]; then
|
if [ "${RET}" != "" ]; then
|
||||||
db_go
|
db_go
|
||||||
if ! grep GITLAB_HOST /etc/gitlab/gitlab-debian.conf
|
if ! grep GITLAB_HOST ${gitlab_debian_conf}
|
||||||
then
|
then
|
||||||
echo export GITLAB_HOST=${RET} >> /etc/gitlab/gitlab-debian.conf
|
echo export GITLAB_HOST=${RET} >> ${gitlab_debian_conf}
|
||||||
echo export GITLAB_EMAIL_FROM="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
|
echo export GITLAB_EMAIL_FROM="no-reply@${RET}" >> ${gitlab_debian_conf}
|
||||||
echo export GITLAB_EMAIL_DISPLAY_NAME="Gitlab" >> /etc/gitlab/gitlab-debian.conf
|
echo export GITLAB_EMAIL_DISPLAY_NAME="Gitlab" >> ${gitlab_debian_conf}
|
||||||
echo export GITLAB_EMAIL_REPLY_TO="no-reply@${RET}" >> /etc/gitlab/gitlab-debian.conf
|
echo export GITLAB_EMAIL_REPLY_TO="no-reply@${RET}" >> ${gitlab_debian_conf}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -f ${nginx_conf_example}
|
||||||
|
then
|
||||||
|
sed -e "s/YOUR_SERVER_FQDN/${RET}/"\
|
||||||
|
${nginx_conf_example} >/etc/nginx/sites-available/${RET}
|
||||||
|
ln -fs /etc/nginx/sites-available/${RET} /etc/nginx/sites-enabled/
|
||||||
|
else
|
||||||
|
echo "nginx.conf.example not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Failed to retrieve fully qualified domain name"
|
echo "Failed to retrieve fully qualified domain name"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue