readme and ca handling

This commit is contained in:
Wolfgang Hottgenroth 2020-07-03 14:32:50 +00:00
parent 316591bcaf
commit 1d749f8eee
3 changed files with 26 additions and 0 deletions

View File

@ -25,6 +25,7 @@ RUN \
COPY start.sh /usr/local/sbin/
EXPOSE 80
VOLUME /usr/local/share/ca-certificates/
CMD /usr/local/sbin/start.sh

23
readme.md Normal file
View File

@ -0,0 +1,23 @@
# Reviewboard in a container
* Create a database and a database user on a MariaDB/MySQL server, grant all privileges on all tables of that database to that user
* If you want to inject custom CA certificates for repository access, create a volume, put these certificates (use the extension .ext) into and mount it to `/usr/local/share/ca-certificates/` of the container when starting it.
* Start the container with something like
``
docker run \
-d \
--rm \
--name reviews \
-p 8080:80 \
-e DBHOST=10.8.10.5 \
-e DBNAME=reviewboard \
-e DBUSER=reviewboard \
-e DBPASS=test123 \
-e ADMINPASS=test123 \
-v RB_CERTS:/usr/local/share/ca-certificates/ \
reviews
``

View File

@ -1,5 +1,7 @@
#!/bin/bash
update-ca-certificates
rb-site install --noinput --opt-out-support-data --domain=reviews --db-type=mysql --db-name=reviewboard --db-host="$DBHOST" --db-user="$DBUSER" --db-pass="$DBPASS" --cache-type=file --cache-info=/tmp/rb-cache --web-server-type=apache --web-server-port=80 --admin-user=admin --admin-password="$ADMINPASS" /var/www/reviewboard
chown -R www-data /var/www/reviewboard/data/ /var/www/reviewboard/logs/ /var/www/reviewboard/htdocs/media/uploaded/ /var/www/reviewboard/htdocs/media/ext