wrapper 479 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash

function sigterm_handler() {
    echo "SIGTERM signal received, try to gracefully shutdown all services..."
    gitlab-ctl stop
}

trap "sigterm_handler; exit" TERM

function entrypoint() {
    /opt/gitlab/embedded/bin/runsvdir-start &
12 13
    gitlab-ctl reconfigure # will also start everything
    gitlab-ctl tail # tail all logs
14 15
}

Kamil Trzcinski's avatar
Kamil Trzcinski committed
16 17 18 19 20
if [[ ! -e /etc/gitlab/gitlab.rb ]]; then
	cp /assets/gitlab.rb /etc/gitlab/gitlab.rb
	chmod 0600 /etc/gitlab/gitlab.rb
fi

21
entrypoint