List of commits:
Subject Hash Author Date (UTC)
Container changes cb3c4a84e2abc3a4b206925b60fdf4524e0379de Catalin(ux) M. BOIE 2021-10-21 06:01:25
Lots of html/css changes bde37682fac058f68806b3342ba043a2f72458ba Catalin(ux) M. BOIE 2021-10-21 06:00:29
Lots of tests updated 40e01f4db4d341d4e2dceb4407ea7d6ff523ac9e Catalin(ux) M. BOIE 2021-10-21 06:00:02
Big changes to add rpm packages repositories 5e07ff440d6ad7f0ef9900a634b2f39f0e7fa1e4 Catalin(ux) M. BOIE 2021-10-21 05:59:26
Cosmetic 02376344f7d7d321d824ab7978de2ad49c007167 Catalin(ux) M. BOIE 2021-05-23 12:57:06
Added FIDO2 support for SSH 04186abe13896ad4f4ea7126691d0a2b1798de1a Catalin(ux) M. BOIE 2021-05-23 12:30:43
ssh: show the id of the key both on web and when connecting ab95ccfa2819d6ac9f427209ee61c75aad8a3661 Catalin(ux) M. BOIE 2021-05-23 10:52:44
Some events are doing some queries, and we need to cover them in transaction, not only the subevents 4768ffec303961971cc0c3732a24e858f47dd381 Catalin(ux) M. BOIE 2020-12-15 07:33:36
Added rate limit for ssh and git connections b667130e6c5721a3d30193863a5defd8bbff50f1 Catalin(ux) M. BOIE 2020-11-30 10:49:27
cosmetic abe44edadda9da7c639b7bd8c9e13e6058555669 Catalin(ux) M. BOIE 2020-11-30 10:21:01
gpg functions and test ecb9e05c99a2b73edfba5014329e362d8c6e9246 Catalin(ux) M. BOIE 2020-11-09 07:38:11
Stats page is not rendered for bots. 29ca3f62ac460b64eb0a10fbb8bdfdf4a1767dc5 Catalin(ux) M. BOIE 2020-10-13 05:48:43
Added rate limit options 60e939a52577a01603f9f386ffaf1a9712f99ab6 Catalin(ux) M. BOIE 2020-10-07 05:02:25
Improved bots list and clean old entries 9da0a014040753734beabfecb298b8956fc25fe3 Catalin(ux) M. BOIE 2020-10-05 06:34:43
builder: use secrets only if available 4fe47afc60435508ad90f62c51d489ac3c20b4d0 Catalin(ux) M. BOIE 2020-08-28 07:29:14
worker: use secrets only if available 5371e918e294a46cc38c765371a1caf7a3083eef Catalin(ux) M. BOIE 2020-08-28 07:28:12
builder: do not break meta variable 1d8207b1a782ab039406dbd087cdc9bb5ea0b898 Catalin(ux) M. BOIE 2020-08-28 07:27:48
Whitespace 86086337c5323b073f517bc59c18aba0808fb4f3 Catalin(ux) M. BOIE 2020-08-24 07:22:13
Bump version to 0.73 7cac4d7a31116ac9ad86e0babeb0c1aace5dd852 Catalin(ux) M. BOIE 2020-08-23 15:32:03
duilder update f691d84aa0aa70ef60a7487f247ed1a9ab1e3ab1 Catalin(ux) M. BOIE 2020-08-23 15:31:38
Commit cb3c4a84e2abc3a4b206925b60fdf4524e0379de - Container changes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2021-10-21 06:01
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2021-10-21 06:01
Parent(s): bde37682fac058f68806b3342ba043a2f72458ba
Signer:
Signing key:
Signing status: N
Tree: 34137cf4f0400491ba3055c7d94ed63aecbfb1a6
File Lines added Lines deleted
docker/.gitignore 1 1
docker/Dockerfile-postgresql.tmpl 5 25
docker/Dockerfile-rocketgit-dev.tmpl 10 10
docker/Dockerfile-rocketgit.tmpl 1 1
docker/build.sh 36 18
docker/init-pg.sh 10 0
docker/rg.sh 44 31
File docker/.gitignore changed (mode: 100644) (index 3bf8a23..c418961)
1 1 Dockerfile-postgresql Dockerfile-postgresql
2 2 Dockerfile-rocketgit-alpine Dockerfile-rocketgit-alpine
3 3 Dockerfile-rocketgit Dockerfile-rocketgit
4 prepare
4 Dockerfile-rocketgit-dev
File docker/Dockerfile-postgresql.tmpl changed (mode: 100644) (index 4c0ebb5..14795a5)
1 FROM fedora:32
1 FROM postgres:latest
2 2 MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro>
3 3
4 EXPOSE 5432
5
6 USER root
7 RUN dnf -y --setopt=tsflags=nodocs install postgresql-server psmisc procps-ng glibc-langpack-en
8
9 # Force cache cleaning
10 RUN echo @@RP_VER@@
11
12 RUN dnf -y --setopt=tsflags=nodocs upgrade --best --allowerasing
13
14 USER postgres
15 4 ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
16 5 ENV LC_CTYPE en_US.UTF-8 ENV LC_CTYPE en_US.UTF-8
17 ENV PGDATA /var/lib/pgsql/data
18 6
19 RUN ls -l /var/lib/pgsql/data
20 RUN initdb --data-checksums
21
22 RUN pg_ctl start -w --timeout 60 \
23 && psql --command "CREATE USER rocketgit WITH PASSWORD 'rock'" \
24 && createdb -O rocketgit rocketgit
25
26 RUN echo "host all all 0.0.0.0/0 trust" >> /var/lib/pgsql/data/pg_hba.conf
27 RUN echo "listen_addresses='*'" >> /var/lib/pgsql/data/postgresql.conf
28
29 VOLUME /var/lib/pgsql
7 # Force cache cleaning
8 RUN echo @@RP_VER@@
30 9
31 CMD ["/usr/bin/postgres"]
10 #RUN dnf -y --setopt=tsflags=nodocs upgrade --best --allowerasing
11 RUN apt update && apt -y upgrade
32 12
File docker/Dockerfile-rocketgit-dev.tmpl copied from file docker/Dockerfile-rocketgit.tmpl (similarity 78%) (mode: 100644) (index c0a8c09..cfe2f2b)
1 FROM fedora:32
1 FROM fedora:latest
2 2 MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro>
3 3
4 4 EXPOSE 80 EXPOSE 80
 
... ... EXPOSE 443
6 6 EXPOSE 22 EXPOSE 22
7 7 EXPOSE 9418 EXPOSE 9418
8 8
9 COPY rg.sh /
10
11 CMD ["/rg.sh"]
12
13 9 RUN dnf -y --setopt=tsflags=nodocs upgrade --best --allowerasing; echo @@VER@@ RUN dnf -y --setopt=tsflags=nodocs upgrade --best --allowerasing; echo @@VER@@
14 RUN dnf -y --setopt=tsflags=nodocs install \
15 http://kernel.embedromix.ro/dinorepo-0.0.12-1.noarch.rpm
16 10
17 11 RUN dnf -y --setopt=tsflags=nodocs install psmisc procps-ng sendmail \ RUN dnf -y --setopt=tsflags=nodocs install psmisc procps-ng sendmail \
18 php-opcache qrencode openssh-server nginx rocketgit
19
20 RUN dnf -y clean all
12 php-opcache qrencode openssh-server nginx \
13 php-fpm php-cli php-pgsql php-mbstring git-core \
14 php-json php-ldap util-linux fuse strace gpg mc
21 15
22 16 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' \ RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' \
23 17 /etc/php.d/10-opcache.ini /etc/php.d/10-opcache.ini
 
... ... RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' \
26 20 RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users \ RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users \
27 21 || echo "rocketgit" >> /etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users
28 22
23 CMD ["/rg.sh"]
24
25 RUN useradd rocketgit
26
27 COPY rg.sh /
28
29 29 # Pay attention! Volumes comes after we populate the folders! # Pay attention! Volumes comes after we populate the folders!
30 30 VOLUME /var/lib/rocketgit VOLUME /var/lib/rocketgit
31 31 VOLUME /home/rocketgit VOLUME /home/rocketgit
File docker/Dockerfile-rocketgit.tmpl changed (mode: 100644) (index c0a8c09..086d20a)
1 FROM fedora:32
1 FROM fedora:latest
2 2 MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro>
3 3
4 4 EXPOSE 80 EXPOSE 80
File docker/build.sh changed (mode: 100755) (index 6b6232f..07c89af)
1 1 #!/bin/bash #!/bin/bash
2 2
3 if [ "${1}" = "" ]; then
4 op=""
5 else
6 op=${1}
7 fi
8
3 9 set -u set -u
4 10 set -e set -e
5 11
6 12 . ../duilder.conf . ../duilder.conf
7 13
8 RP_VER="20200609"
14 RP_VER="20210907"
9 15
10 16 docker="podman" docker="podman"
11 17
12 sed \
13 -e "s|@@RP_VER@@|${RP_VER}|" \
14 Dockerfile-postgresql.tmpl > Dockerfile-postgresql
15 if [ "`${docker} images -q rocketgit/rocketgit-postgresql:${RP_VER}`" = "" ]; then
16 echo "Building rocketgit-postgresql (${RP_VER})..."
17 ${docker} build \
18 --net container \
19 --tag="rocketgit/rocketgit-postgresql:${RP_VER}" \
20 -f Dockerfile-postgresql \
21 .
22 ${docker} tag "rocketgit/rocketgit-postgresql:${RP_VER}" \
23 "rocketgit/rocketgit-postgresql:latest"
24 fi
18 # We use official postgresql image
19 #sed \
20 # -e "s|@@RP_VER@@|${RP_VER}|" \
21 # Dockerfile-postgresql.tmpl > Dockerfile-postgresql
22 #if [ "`${docker} images -q rocketgit/rocketgit-postgresql:${RP_VER}`" = "" ]; then
23 # echo "Building rocketgit-postgresql (${RP_VER})..."
24 # ${docker} build \
25 # --net container \
26 # --tag="rocketgit/rocketgit-postgresql:${RP_VER}" \
27 # -f Dockerfile-postgresql \
28 # .
29 # ${docker} tag "rocketgit/rocketgit-postgresql:${RP_VER}" \
30 # "rocketgit/rocketgit-postgresql:latest"
31 #fi
25 32
26 33
34 if [ "${op}" = "dev" ]; then
35 f="Dockerfile-rocketgit-dev"
36 v="dev"
37 tag="dev"
38 else
39 f="Dockerfile-rocketgit"
40 v="${VER}"
41 tag="latest"
42 fi
27 43 echo "Building rocketgit (fedora)..." echo "Building rocketgit (fedora)..."
28 sed -e "s|@@VER@@|${VER}|" Dockerfile-rocketgit.tmpl > Dockerfile-rocketgit
44 sed -e "s|@@VER@@|${VER}|" ${f}.tmpl > ${f}
29 45 ${docker} build \ ${docker} build \
30 --tag="rocketgit/rocketgit:${VER}" \
31 -f Dockerfile-rocketgit \
46 --tag="rocketgit/rocketgit:${v}" \
47 -f ${f} \
32 48 . .
33 ${docker} tag "rocketgit/rocketgit:${VER}" "rocketgit/rocketgit:latest"
49 if [ "${op}" != "dev" ]; then
50 ${docker} tag "rocketgit/rocketgit:${v}" "rocketgit/rocketgit:${tag}"
51 fi
34 52
35 53
36 54 # This is not working because alpine's chmod does not know about --reference # This is not working because alpine's chmod does not know about --reference
File docker/init-pg.sh added (mode: 100644) (index 0000000..5d3e9f1)
1 #!/bin/bash
2
3 set -e
4
5 psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
6 CREATE USER rocketgit WITH PASSWORD 'rock';
7 CREATE DATABASE rocketgit;
8 GRANT ALL PRIVILEGES ON DATABASE rocketgit TO rocketgit;
9 EOSQL
10
File docker/rg.sh changed (mode: 100755) (index 3bc1df6..079ca37)
2 2
3 3 # This file will be included in docker 'rocketgit' Dockerfile # This file will be included in docker 'rocketgit' Dockerfile
4 4
5 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
5 # Exporting vars seems is not hitting php-fpm :(
6 # Probably it sanitizes the environment.
7 if [ "${RG_DEBUG}" != "" ]; then
8 echo ${RG_DEBUG} > /home/rocketgit/rg_debug
9 fi
10 if [ "${RG_SQL_ADD}" != "" ]; then
11 echo "${RG_SQL_ADD}" > /home/rocketgit/sql_add
12 fi
13
14 list="/var/log/rocketgit
15 /var/lib/rocketgit
16 /var/lib/rocketgit/locks
17 /var/lib/rocketgit/sockets
18 /var/lib/rocketgit/repos
19 /var/lib/rocketgit/q_merge_requests
20 /var/lib/rocketgit/qstats
21 /var/lib/rocketgit/tmp"
22 mkdir ${list}
23 chown rocketgit:rocketgit ${list}
24 chmod o= ${list}
25
26 chmod 0771 /var/lib/rocketgit
6 27
7 28 echo "Generating sshd keys..." echo "Generating sshd keys..."
8 29 for i in rsa ecdsa ed25519; do for i in rsa ecdsa ed25519; do
 
... ... if [ ! -r /etc/pki/tls/certs/localhost.crt ]; then
20 41 -out /etc/pki/tls/certs/localhost.crt -out /etc/pki/tls/certs/localhost.crt
21 42 fi fi
22 43
23 (
24 sed -i -e 's/ default_server//g' /etc/nginx/nginx.conf
25
26 cd /etc/nginx/conf.d
27 sed -r \
28 -e 's/listen (.*);/listen \1 default_server;/g' \
29 rocketgit.conf.sample \
30 > rocketgit.conf
31 )
32
33 44 while [ 1 ]; do while [ 1 ]; do
34 45 # rocketgit-fpm will be started automatically! # rocketgit-fpm will be started automatically!
35 46 if [ "`ps ax|grep -v grep|grep \"pool rocketgit\"`" = "" ]; then if [ "`ps ax|grep -v grep|grep \"pool rocketgit\"`" = "" ]; then
 
... ... while [ 1 ]; do
49 60 fi fi
50 61 fi fi
51 62
52 if [ "`ps ax|grep -v grep|grep cron`" = "" ]; then
53 echo "Running cron..."
54 crond
63 su - rocketgit -c /usr/share/rocketgit/scripts/cache.sh &
64 su - rocketgit -c /usr/share/rocketgit/scripts/cron.sh &
65 su - rocketgit -c /usr/share/rocketgit/scripts/events.sh &
66 su - rocketgit -c /usr/share/rocketgit/scripts/builder.sh &
67 #su - rocketgit -c /usr/share/rocketgit/scripts/worker.sh &
68
69 # More work to do here
70 #if [ "`ps ax|grep -v grep|grep git-daemon`" = "" ]; then
71 # echo "Running git-daemon..."
72 # /usr/libexec/git-core/git-daemon --base-path=/var/lib/git \
73 # --export-all --user-path=public_git \
74 # --inetd --log-destination=stderr --verbose
75 # if [ "${?}" != "0" ]; then
76 # echo "ERROR: could not start git-daemon!"
77 # fi
78 #fi
79
80 if [ "`ps ax|grep -v grep|grep sshd`" = "" ]; then
81 echo "Running sshd..."
82 /usr/sbin/sshd &>/tmp/sshd.log
55 83 if [ "${?}" != "0" ]; then if [ "${?}" != "0" ]; then
56 echo "ERROR: could not start crond!"
84 echo "ERROR: could not start sshd!"
57 85 fi fi
58 86 fi fi
59 87
 
... ... while [ 1 ]; do
65 93 fi fi
66 94 fi fi
67 95
68 if [ "`ps ax|grep -v grep|grep xinetd`" = "" ]; then
69 echo "Running xinetd..."
70 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
71 if [ "${?}" != "0" ]; then
72 echo "ERROR: could not start xinetd!"
73 fi
74 fi
75
76 if [ "`ps ax|grep -v grep|grep sshd`" = "" ]; then
77 echo "Running sshd..."
78 /usr/sbin/sshd &>/tmp/sshd.log
79 if [ "${?}" != "0" ]; then
80 echo "ERROR: could not start sshd!"
81 fi
82 fi
83
84 96 sleep 30 sleep 30
85 97 done done
98
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://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

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