grim/containers/reviewboard

Parents 4016eb3c7722
Children e9223d04bdb2
Move to the offical image and build s simple nginx container that contains the static files
  • +5 -42
    Dockerfile
  • +14 -5
    convey.yml
  • --- a/Dockerfile Mon Jul 19 20:41:20 2021 -0500
    +++ b/Dockerfile Fri Aug 06 02:59:24 2021 -0500
    @@ -1,47 +1,10 @@
    -FROM debian:buster-slim
    -MAINTAINER grim@reaperworld.com
    -
    -ENV RB_VERSION 3.0.24
    +FROM beanbag/reviewboard:4.0.4 AS app
    -# install the dependencies for reviewboard
    -RUN apt-get update -y && \
    - apt-get install --no-install-recommends -y \
    - build-essential python-dev libffi-dev libssl-dev patch \
    - python-pip python-setuptools python-wheel python-virtualenv \
    - uwsgi uwsgi-plugin-python \
    - postgresql-client \
    - python-psycopg2 python-ldap \
    - git-core mercurial subversion python-svn \
    - && \
    - apt-get clean && \
    - rm -rf /var/lib/apt/lists/*
    -
    -# install reviewboard
    +# install rbjbhub
    RUN set -ex && \
    - python -m virtualenv --system-site-packages /opt/venv && \
    - . /opt/venv/bin/activate && \
    - pip install \
    - "ReviewBoard==${RB_VERSION}" \
    - django-storages==1.1.8 \
    - oauthlib==1.0.1 \
    - semver \
    - && \
    - rm -rf /root/.cache
    -
    -# additional housekeeping
    -ENV PATH="/opt/venv/bin:${PATH}"
    + pip install --no-cache rbjbhub
    -COPY start.sh uwsgi.ini shell.sh upgrade-site.py /
    -
    -EXPOSE 8000
    -
    -CMD ["/start.sh"]
    +FROM nginx:1.21 AS nginx
    -# install rbjbhub and rbintegrations 2.0beta1
    -RUN set -e && \
    - . /opt/venv/bin/activate && \
    - set -x && \
    - python -m pip install -U \
    - rbjbhub \
    - https://downloads.reviewboard.org/releases/rbintegrations/2.0/rbintegrations-2.0b1-py2.py3-none-any.whl#md5=df8fa4b93e13a17d99500a5bdd14d483
    +COPY --from=app /venv/lib/python3.8/site-packages/reviewboard/htdocs /var/www/reviewboard/htdocs/
    --- a/convey.yml Mon Jul 19 20:41:20 2021 -0500
    +++ b/convey.yml Fri Aug 06 02:59:24 2021 -0500
    @@ -10,10 +10,17 @@
    type: docker/import
    files: .:.
    - build:
    + build-app:
    type: docker/build
    dockerfile: Dockerfile
    - tag: ${REGISTRY}/${REPO}:${TAG}
    + tag: ${REGISTRY}/${REPO}-app:${TAG}
    + target: app
    + files: .:.
    + build-nginx:
    + type: docker/build
    + dockerfile: Dockerfile
    + tag: ${REGISTRY}/${REPO}-nginx:${TAG}
    + target: nginx
    files: .:.
    login:
    @@ -28,16 +35,18 @@
    push:
    type: docker/push
    - images: ${REGISTRY}/${REPO}:${TAG}
    + images:
    + - ${REGISTRY}/${REPO}-app:${TAG}
    + - ${REGISTRY}/${REPO}-nginx:${TAG}
    plans:
    default:
    stages:
    - - tasks: [import, build]
    + - tasks: [import, build-app, build-nginx]
    ci:
    stages:
    - - tasks: [import, build, login, push]
    + - tasks: [import, build-app, build-nginx, login, push]
    - tasks: [logout]
    run: always