Skip to content

Commit

Permalink
OCI image creation infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 16, 2023
1 parent 66d46b8 commit 568e338
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
graft src/collective
graft examples
include *.rst
exclude container/*
global-exclude *.pyc
21 changes: 21 additions & 0 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1
FROM python:3.12-slim

ARG IMAGE_VERSION
ARG PACKAGE_VERSION

# TODO: use https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL version="${PACKAGE_VERSION}-${IMAGE_VERSION}"
LABEL description="Ingestion service queue runner between Plone RestAPI and ElasticSearch or OpenSearch."
LABEL maintainer="Jens Klein"
LABEL org.label-schema.name="collective.elastic.ingest"
LABEL org.label-schema.description="Ingestion service queue runner between Plone RestAPI and ElasticSearch or OpenSearch."
LABEL org.label-schema.vendor="Klein & Partner KG and Contributors"

RUN <<EOT
pip install --upgrade pip
pip install "collective.elastic.ingest[opensearch,elasticsearch,redis,rabbitmq]==$PACKAGE_VERSION"
EOT

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
7 changes: 7 additions & 0 deletions container/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -o errexit

CONCURRENCY="${CELERY_CONCURRENCY:=1}"
LOGLEVEL="${CELERY_LOGLEVEL:=info}"

celery -A collective.elastic.ingest.celery.app worker -c $CONCURRENCY -l $LOGLEVEL
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "collective.elastic.ingest"
version = "2.0.0dev0"
version = "2.0.0rc1.dev0"
description = "Ingestion service queue runner between Plone RestAPI and ElasticSearch or OpenSearch."
keywords = ["elasticsearch", "opensearch", "plone", "celery", "search", "indexer"]
readme = "README.rst"
Expand Down

0 comments on commit 568e338

Please sign in to comment.