| |
@@ -0,0 +1,45 @@
|
| |
+ FROM quay.io/almalinuxorg/9-base
|
| |
+
|
| |
+ LABEL org.opencontainers.image.authors="pagure community"
|
| |
+ LABEL org.opencontainers.image.url="https://pagure.io/pagure"
|
| |
+ LABEL org.opencontainers.image.source="https://pagure.io/pagure"
|
| |
+ LABEL org.opencontainers.image.documentation="https://docs.pagure.org/pagure/index.html"
|
| |
+
|
| |
+ ARG repo=https://pagure.io/pagure.git
|
| |
+ ARG branch=master
|
| |
+
|
| |
+ ENV REPO=$repo
|
| |
+ ENV BRANCH=$branch
|
| |
+ ENV ALEMBIC_CONFIG=/alembic.ini
|
| |
+ ENV PAGURE_CONFIG=/pagure.cfg
|
| |
+
|
| |
+ RUN dnf -y install \
|
| |
+ python3 \
|
| |
+ git \
|
| |
+ python3-devel \
|
| |
+ gcc \
|
| |
+ zlib-devel \
|
| |
+ libjpeg-devel \
|
| |
+ && git clone $REPO -b $BRANCH \
|
| |
+ && python3 -m venv /venv \
|
| |
+ && source /venv/bin/activate \
|
| |
+ && python -m pip install --upgrade pip build \
|
| |
+ && python -m pip install -r /pagure/requirements.txt \
|
| |
+ -r /pagure/requirements-ci.txt \
|
| |
+ -r /pagure/requirements-optional.txt \
|
| |
+ -r /pagure/requirements-testing.txt \
|
| |
+ gunicorn \
|
| |
+ && cd /pagure \
|
| |
+ && python setup.py build \
|
| |
+ && python setup.py install \
|
| |
+ && rm -rf build/ \
|
| |
+ && python -m pip cache purge \
|
| |
+ && dnf -y remove \
|
| |
+ python3-devel \
|
| |
+ gcc \
|
| |
+ zlib-devel \
|
| |
+ libjpeg-devel \
|
| |
+ && dnf clean all
|
| |
+
|
| |
+ COPY alembic.ini /alembic.ini
|
| |
+ COPY pagure.cfg /pagure.cfg
|
| |
Work in progress / under development
container
Currently there are no pre-build pagure container images.
When the work on this PR is completed, the next step is to regularly build images and publish them under the
pagure
org on quay.io.Why new container files? The current files are located under
dev/
and tailored to the requirements to run local unit / integration tests.pagure-base
FROM quay.io/almalinuxorg/9-base
- At this moment pagure works best with pyton 3.9
pip based venv
- Gives us the most control about the module versions, necessary at this point, the goal is to switch to rpm at a later point
dev tools and caches
- installed dev tools (e.g.) are removed at the end of the RUN step. The dnf and pip cache is cleaned as well to reduce image size.
pagure.cfg and alembic.ini
- The base container ships a default version which is supposed to be replaced with a customized version during deployment. On k8s for example by mounting a ConfigMap.
pagure-server
The entrypoint script contains logic to trigger either a createdb or upgrade action via alembic. Gunicorn is then used to start a pagure application instance.
pagure-worker
The entrypoint script activates the python venv and executes
runworker.py
. Default values to work as task handler for standard pagure tasks. Parameters can be customized to run another work instance forlogcom
pagure-docs
Behavior similar to
pagure-server
, gunicorn starts and instance of thepagure.docs_server
application instead.pagure-ev
Entrypoint activates the venv and then executes
pagure-ev/pagure_stream_server.py
.kubernetes
The first iteration is a deployment manifest that spins up a working pagure instance on a k8s cluster.
In future this should then probably become a more majure Helm Chart that's available via quay.io next to pagure container images.