List of commits:
Subject Hash Author Date (UTC)
Docker fixes 16b1c0adb4518db3a1498c1e30d5a409b692b2bb Catalin(ux) M. BOIE 2017-06-25 07:36:09
Disabled repo 'Stats' menu because of performance issues da34324ac9972bac872916aef29d1d4e0b8f0499 Catalin(ux) M. BOIE 2017-06-09 17:50:54
Manually free memory to improve performance d6b93c1dc2aef248fba8d5f4a34e57ad3433f82f Catalin(ux) M. BOIE 2017-06-09 17:37:37
Add a random id to all requests to be able to identify them in the logs 1a487eb279fb2f77db64dbee1b2c1067b548899b Catalin(ux) M. BOIE 2017-05-29 17:09:20
Docker improvements and 'make docker' to easy testing 2171599842a90282c24845d41965ef6f7893342c Catalin(ux) M. BOIE 2017-05-28 10:09:21
Improved apache sample configuration de04d409f25a6f5d1fe304069753144c17c4f631 Catalin(ux) M. BOIE 2017-05-28 10:07:47
Use the database only after we setup the connection 26487d0f17f510d26ef182b6c0938022b0730752 Catalin(ux) M. BOIE 2017-05-25 16:39:53
Bump version to 0.68 02b4708f1cdad67a810f7f1808364774e8ac4831 Catalin(ux) M. BOIE 2017-05-25 14:33:17
Small debug of schema_ver 990ad6c4fad455a284a19ed2a60e80442c4ac9d8 Catalin(ux) M. BOIE 2017-05-25 14:32:54
TODO updates ea0e06ee96761e3220ac7a27ede1669c7501b9ba Catalin(ux) M. BOIE 2017-05-25 14:29:43
Prepare env to use base_url d6c009c120fce4df47a7651a94619142c8992d52 Catalin(ux) M. BOIE 2017-05-24 19:05:08
Use base_url function instead of the obsolete web_url variable a821ee84f3dcf7294ee569dbc2da8b442cb60f29 Catalin(ux) M. BOIE 2017-05-24 19:03:49
Declare state as loaded only if I can really save it in cache 10c2fcf9b78d6eb568e81ec34addfa2246d32618 Catalin(ux) M. BOIE 2017-05-24 18:53:25
Small texts fixes 9f7998f23276d44435bd3319099d13bcb40c6b7e Catalin(ux) M. BOIE 2017-05-24 18:51:50
Improved http tests by using persistent connections 9b77048af3f73f8bf30128d5b07a2bae28315d45 Catalin(ux) M. BOIE 2017-05-24 18:48:50
Big change allowing http and https to work in parallel 3f1836953c50735c7860da1f951eb82a42a1940b Catalin(ux) M. BOIE 2017-05-24 15:19:39
Do not generate an internal error if the user has no e-mail 6c355fe874750a9b5f454cbeeea28b5cf0f00236 Catalin(ux) M. BOIE 2017-05-06 10:55:41
Use rg_exec in tests to polute the output df300f967ebfaa70499d5b599dcb1dfae02a89f3 Catalin(ux) M. BOIE 2017-04-29 22:56:05
Send errors on sterr instead of stdout for ssh commands 006772c3e526e6cdbc92a52b452842bf8b46c4eb Catalin(ux) M. BOIE 2017-04-29 22:53:25
Added samples config files in the doc folder 6dad3cb75cba2203fe2f091285a708822192f306 Catalin(ux) M. BOIE 2017-04-29 15:12:05
Commit 16b1c0adb4518db3a1498c1e30d5a409b692b2bb - Docker fixes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-06-25 07:36
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-06-25 07:42
Parent(s): da34324ac9972bac872916aef29d1d4e0b8f0499
Signer:
Signing key:
Signing status: N
Tree: 129b2af7c0d5c3b7785b844cbf65e0b7ac34bb4c
File Lines added Lines deleted
docker/.gitignore 2 0
docker/Dockerfile-postgresql.tmpl 18 5
docker/Dockerfile-rocketgit-alpine.tmpl 9 8
docker/Dockerfile-rocketgit.tmpl 7 5
docker/build.sh 16 2
docker/postgresql-start.sh 0 29
docker/prepare.sh 8 0
docker/rg.sh 10 5
samples/logrotate 0 1
File docker/.gitignore changed (mode: 100644) (index a8e2d10..3bf8a23)
1 1 Dockerfile-postgresql Dockerfile-postgresql
2 Dockerfile-rocketgit-alpine
2 3 Dockerfile-rocketgit Dockerfile-rocketgit
4 prepare
File docker/Dockerfile-postgresql.tmpl changed (mode: 100644) (index 0dfa687..356c3d9)
... ... MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro>
3 3
4 4 EXPOSE 5432 EXPOSE 5432
5 5
6 COPY postgresql-start.sh /
6 CMD ["/usr/bin/postgres"]
7 7
8 CMD ["/postgresql-start.sh"]
8 RUN dnf -y install postgresql-server psmisc procps-ng
9 9
10 RUN dnf -y upgrade --best --allowerasing; echo @@RP_VER@@
11 RUN dnf -y install postgresql-server psmisc
10 # Force cache cleaning
11 RUN echo @@RP_VER@@
12
13 RUN dnf -y upgrade --best --allowerasing
12 14
13 15 USER postgres USER postgres
14 16 ENV LANG en_US.utf8 ENV LANG en_US.utf8
15 17 ENV PGDATA /var/lib/pgsql/data ENV PGDATA /var/lib/pgsql/data
16 18
17 19 RUN initdb --data-checksums RUN initdb --data-checksums
20 RUN pg_ctl start -w --timeout 60 \
21 && psql --command "CREATE USER rocketgit WITH PASSWORD 'rock'" \
22 && createdb -O rocketgit rocketgit
23
24 USER root
25 RUN echo "host all all 0.0.0.0/0 trust" >> /var/lib/pgsql/data/pg_hba.conf
26 RUN echo "listen_addresses='*'" >> /var/lib/pgsql/data/postgresql.conf
27
28 USER postgres
29 ENV LANG en_US.utf8
30 ENV PGDATA /var/lib/pgsql/data
18 31
19 VOLUME /var/lib/postgresql/data
32 VOLUME /var/lib/pgsql
20 33
File docker/Dockerfile-rocketgit-alpine.tmpl copied from file docker/Dockerfile-rocketgit.tmpl (similarity 57%) (mode: 100644) (index 8c4a156..4466bf0)
1 FROM fedora:25
1 FROM alpine:3.6
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
 
... ... COPY rg.sh /
10 10
11 11 CMD ["/rg.sh"] CMD ["/rg.sh"]
12 12
13 RUN dnf -y upgrade --best --allowerasing; echo @@VER@@
14 RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.11-1.noarch.rpm
15 RUN dnf -y install psmisc procps-ng sendmail php-opcache qrencode openssh-server
16 RUN dnf -y --disablerepo=* --enablerepo dinorepo clean all
13 RUN apk update \
14 && apk add psmisc procps postfix php7-opcache libqrencode openssh-server \
15 git php7 shadow bash \
16 && echo @@VER@@
17
18 RUN cd /tmp && GIT_CURL_VERBOSE=1 GIT_TRACE=1 \
19 git clone https://rocketgit.com/user/catalinux/rocketgit \
20 && cd rocketgit && ./configure && make && make install
17 21
18 22 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php.d/10-opcache.ini RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php.d/10-opcache.ini
19 23 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php-zts.d/10-opcache.ini RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php-zts.d/10-opcache.ini
20 24 RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users
21 RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users
22
23 RUN dnf -y install rocketgit
24 25
25 26 # Pay attention! Volumes comes after we populate the folders! # Pay attention! Volumes comes after we populate the folders!
26 27 VOLUME /var/lib/rocketgit VOLUME /var/lib/rocketgit
File docker/Dockerfile-rocketgit.tmpl changed (mode: 100644) (index 8c4a156..87467b6)
... ... CMD ["/rg.sh"]
12 12
13 13 RUN dnf -y upgrade --best --allowerasing; echo @@VER@@ RUN dnf -y upgrade --best --allowerasing; echo @@VER@@
14 14 RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.11-1.noarch.rpm RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.11-1.noarch.rpm
15 RUN dnf -y install psmisc procps-ng sendmail php-opcache qrencode openssh-server
15 RUN dnf -y install psmisc procps-ng sendmail php-opcache qrencode openssh-server nginx
16 16 RUN dnf -y --disablerepo=* --enablerepo dinorepo clean all RUN dnf -y --disablerepo=* --enablerepo dinorepo clean all
17 17
18 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php.d/10-opcache.ini
19 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php-zts.d/10-opcache.ini
20 RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users
21 RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users
18 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' \
19 /etc/php.d/10-opcache.ini
20 RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' \
21 /etc/php-zts.d/10-opcache.ini
22 RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users \
23 || echo "rocketgit" >> /etc/mail/trusted-users
22 24
23 25 RUN dnf -y install rocketgit RUN dnf -y install rocketgit
24 26
File docker/build.sh changed (mode: 100755) (index 563809a..085efdc)
... ... set -e
5 5
6 6 . ../duilder.conf . ../duilder.conf
7 7
8 RP_VER="20170525"
8 RP_VER="20170616f"
9 9 sed -e "s|@@RP_VER@@|${RP_VER}|" Dockerfile-postgresql.tmpl > Dockerfile-postgresql sed -e "s|@@RP_VER@@|${RP_VER}|" Dockerfile-postgresql.tmpl > Dockerfile-postgresql
10 10 if [ "`docker images -q rocketgit/rocketgit-postgresql:${RP_VER}`" = "" ]; then if [ "`docker images -q rocketgit/rocketgit-postgresql:${RP_VER}`" = "" ]; then
11 11 echo "Building rocketgit-postgresql (${RP_VER})..." echo "Building rocketgit-postgresql (${RP_VER})..."
 
... ... if [ "`docker images -q rocketgit/rocketgit-postgresql:${RP_VER}`" = "" ]; then
17 17 "rocketgit/rocketgit-postgresql:latest" "rocketgit/rocketgit-postgresql:latest"
18 18 fi fi
19 19
20 echo "Building rocketgit..."
20
21 echo "Building rocketgit (fedora)..."
21 22 sed -e "s|@@VER@@|${VER}|" Dockerfile-rocketgit.tmpl > Dockerfile-rocketgit sed -e "s|@@VER@@|${VER}|" Dockerfile-rocketgit.tmpl > Dockerfile-rocketgit
22 23 docker build \ docker build \
23 24 --tag="rocketgit/rocketgit:${VER}" \ --tag="rocketgit/rocketgit:${VER}" \
24 25 -f Dockerfile-rocketgit \ -f Dockerfile-rocketgit \
25 26 . .
26 27 docker tag "rocketgit/rocketgit:${VER}" "rocketgit/rocketgit:latest" docker tag "rocketgit/rocketgit:${VER}" "rocketgit/rocketgit:latest"
28
29
30 # This is not working because alpine's chmod does not know about --reference
31 exit 0
32 echo "Building rocketgit (alpine)..."
33 sed -e "s|@@VER@@|${VER}|" Dockerfile-rocketgit-alpine.tmpl > Dockerfile-rocketgit-alpine
34 docker build \
35 --tag="rocketgit/rocketgit-alpine:${VER}" \
36 -f Dockerfile-rocketgit-alpine \
37 .
38 docker tag "rocketgit/rocketgit-alpine:${VER}" "rocketgit/rocketgit-alpine:latest"
39
40
File docker/postgresql-start.sh deleted (index 5ff1049..0000000)
1 #!/bin/bash
2
3 set -e
4 set -u
5
6 # This file is included in the docker build by Dockerfile-postgresql
7
8 if [ ! -r "${PGDATA}/init_done.txt" ]; then
9 echo "host all all 0.0.0.0/0 trust" >> ${PGDATA}/pg_hba.conf
10 echo "listen_addresses='*'" >> ${PGDATA}/postgresql.conf
11
12 echo "Starting postgres..."
13 postgres &
14
15 sleep 10
16
17 echo "Creating user..."
18 psql --command "CREATE USER rocketgit WITH SUPERUSER PASSWORD 'rock';"
19
20 echo "Creating database..."
21 createdb -O rocketgit rocketgit
22
23 echo "Running..."
24 touch "${PGDATA}/init_done.txt"
25 wait
26 else
27 echo "PostgreSQL is already configured; running..."
28 postgres
29 fi
File docker/prepare.sh added (mode: 100644) (index 0000000..d855aae)
1 #!/bin/bash
2
3 mkdir -p prepare
4
5 sed -r \
6 -e 's/server_name (.*);/server_name drg;/' \
7 ../samples/nginx.conf \
8 > prepare/nginx.conf
File docker/rg.sh changed (mode: 100755) (index 27ba4d9..e64c72b)
4 4
5 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 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
6 6
7 echo "Generating sshd keys..."
8 for i in rsa ecdsa ed25519; do
9 /usr/libexec/openssh/sshd-keygen ${i}
10 done
11
7 12 while [ 1 ]; do while [ 1 ]; do
8 13 # rocketgit-fpm will be started automatically! # rocketgit-fpm will be started automatically!
9 14 if [ "`ps ax|grep -v grep|grep \"pool rocketgit\"`" = "" ]; then if [ "`ps ax|grep -v grep|grep \"pool rocketgit\"`" = "" ]; then
 
... ... while [ 1 ]; do
15 20 fi fi
16 21 fi fi
17 22
18 if [ "`ps ax|grep -v grep|grep http`" = "" ]; then
19 echo "Running httpd..."
20 httpd
23 if [ "`ps ax|grep -v grep|grep nginx`" = "" ]; then
24 echo "Running nginx..."
25 /usr/sbin/nginx
21 26 if [ "${?}" != "0" ]; then if [ "${?}" != "0" ]; then
22 echo "ERROR: could not start httpd!"
27 echo "ERROR: could not start the web server!"
23 28 fi fi
24 29 fi fi
25 30
 
... ... while [ 1 ]; do
49 54
50 55 if [ "`ps ax|grep -v grep|grep sshd`" = "" ]; then if [ "`ps ax|grep -v grep|grep sshd`" = "" ]; then
51 56 echo "Running sshd..." echo "Running sshd..."
52 /usr/sbin/sshd -D
57 /usr/sbin/sshd &>/tmp/sshd.log
53 58 if [ "${?}" != "0" ]; then if [ "${?}" != "0" ]; then
54 59 echo "ERROR: could not start sshd!" echo "ERROR: could not start sshd!"
55 60 fi fi
File samples/logrotate deleted (index 9c3efe9..0000000)
1 # Files will be rotated based on config.php file
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