xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / docker / rg.sh (3916451ae329cabe99ed005f1459a51ab0e98e8f) (1,035B) (mode 100755) [raw]
#!/bin/bash

# This file will be included in docker 'rocketgit' Dockerfile

sed -i -e "s|\$rg_sql = .*$|\$rg_sql = 'host=${RP_PORT_5432_TCP_ADDR} port=${RP_PORT_5432_TCP_PORT} user=rocketgit dbname=rocketgit connect_timeout=10';|" /etc/rocketgit/config.php

while [ 1 ]; do
	if [ "`ps ax|grep -v grep|grep http`" = "" ]; then
		echo "Running httpd..."
		httpd
		if [ "${?}" != "0" ]; then
			echo "ERROR: could not start httpd!"
		fi
	fi

	if [ "`ps ax|grep -v grep|grep cron`" = "" ]; then
		echo "Running cron..."
		crond
		if [ "${?}" != "0" ]; then
			echo "ERROR: could not start crond!"
		fi
	fi

	if [ "`ps ax|grep -v grep|grep sendmail`" = "" ]; then
		echo "Running sendmail..."
		/usr/sbin/sendmail -bd -q1h
		if [ "${?}" != "0" ]; then
			echo "ERROR: could not start sendmail!"
		fi
	fi

	if [ "`ps ax|grep -v grep|grep xinetd`" = "" ]; then
		echo "Running xinetd..."
		/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
		if [ "${?}" != "0" ]; then
			echo "ERROR: could not start xinetd!"
		fi
	fi

	sleep 30
done
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master