initial
This commit is contained in:
commit
78b54382a7
27
.gitlab-ci.yml
Normal file
27
.gitlab-ci.yml
Normal file
@ -0,0 +1,27 @@
|
||||
image: docker:stable
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: registry.hottis.de/dockerized/reviewboard
|
||||
HUB_IMAGE_NAME: wollud1969/reviewboard
|
||||
|
||||
build:
|
||||
stage: build
|
||||
tags:
|
||||
- hottis
|
||||
- linux
|
||||
- docker
|
||||
script:
|
||||
- VERSION=`cat VERSION`
|
||||
- docker build --build-arg RBVERSION=$VERSION --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest --tag $HUB_IMAGE_NAME:$VERSION.
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker push $IMAGE_NAME:latest
|
||||
- docker push $IMAGE_NAME:$VERSION
|
||||
- docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD
|
||||
- docker push $HUB_IMAGE_NAME:latest
|
||||
- docker push $HUB_IMAGE_NAME:$VERSION
|
||||
|
||||
|
||||
|
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
FROM debian:latest
|
||||
|
||||
LABEL Maintainer="Wolfgang Hottgenroth <woho@hottis.de>"
|
||||
LABEL ImageName="registry.hottis.de/dockerized/reviewboard-docker"
|
||||
LABEL AlternativeImageName="wollud1969/reviewboard-docker"
|
||||
|
||||
ENV DBHOST "mariadb"
|
||||
ENV DBNAME "reviewboard"
|
||||
ENV DBUSER "reviewboard"
|
||||
ENV DBPASS "geheim"
|
||||
ENV ADMINPASS "geheim"
|
||||
ARG RB_VERSION
|
||||
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
apt install -y python curl build-essential python-dev libffi-dev libssl-dev patch libmariadbclient-dev cvs git-core subversion apache2 libapache2-mod-wsgi liboauth0 liboauth-dev python-oauth python-ldap && \
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
|
||||
python get-pip.py && \
|
||||
pip install -U pip setuptools && \
|
||||
pip install -U mysqlclient && \
|
||||
pip install -U mercurial && \
|
||||
pip install ReviewBoard${RB_VERSION} django-storages==1.1.8 oauthlib==1.0.1
|
||||
|
||||
COPY start.sh /usr/local/sbin/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD /usr/local/sbin/start.sh
|
||||
|
||||
|
||||
|
14
start.sh
Executable file
14
start.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
cp /var/www/reviewboard/conf/apache-wsgi.conf /etc/apache2/sites-available/reviews.conf
|
||||
rm /etc/apache2/sites-enabled/*.conf
|
||||
ln -s /etc/apache2/sites-available/reviews.conf /etc/apache2/sites-enabled/reviews.conf
|
||||
|
||||
sed -i -e 's/DEBUG = False/DEBUG = True/' /var/www/reviewboard/conf/settings_local.py
|
||||
|
||||
exec apachectl -DFOREGROUND
|
||||
|
Loading…
x
Reference in New Issue
Block a user