-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
43c89d6
commit 107e227
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Container Images | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
create: | ||
tags: | ||
- v* | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build the Docker image | ||
run: | | ||
tag="${GITHUB_REF##*/}" | ||
if [ "$tag" = 'main' ]; then tag='latest'; fi | ||
image_name="ghcr.io/docspell/joex:${tag}" | ||
docker build --cache-from type=gha --cache-to type=gha,mode=max -t "$image_name" . | ||
docker push "$image_name" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM ubuntu:oracular AS base | ||
|
||
|
||
RUN apt update \ | ||
&& apt full-upgrade -y | ||
|
||
RUN apt install -y \ | ||
$(apt list 2>/dev/null | grep 'tesseract-ocr-' | cut -d'/' -f1) \ | ||
tzdata \ | ||
openjdk-21-jre \ | ||
ghostscript \ | ||
unpaper \ | ||
weasyprint \ | ||
unoconv \ | ||
python3-distutils-extra \ | ||
fonts-droid-fallback \ | ||
fonts-dejavu \ | ||
fonts-freefont-ttf \ | ||
fonts-noto \ | ||
pngquant \ | ||
ocrmypdf \ | ||
qpdf | ||
|
||
FROM base AS download | ||
|
||
RUN apt install -y \ | ||
curl \ | ||
unzip | ||
|
||
WORKDIR /opt | ||
|
||
ARG DOCSPELL_VERSION | ||
|
||
RUN curl -sLfo joex.zip "https://github.com/eikek/docspell/releases/download/v${DOCSPELL_VERSION}/docspell-joex-${DOCSPELL_VERSION}.zip" && \ | ||
unzip joex.zip && \ | ||
rm joex.zip && \ | ||
mv docspell-joex-* docspell-joex && \ | ||
rm docspell-joex/conf/docspell-joex.conf | ||
|
||
FROM base | ||
|
||
COPY --from=download /opt/docspell-joex /opt/docspell-joex | ||
|
||
COPY joex-entrypoint.sh /opt/joex-entrypoint.sh | ||
|
||
ENTRYPOINT ["/opt/joex-entrypoint.sh"] | ||
EXPOSE 7878 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
echo "Starting unoconv listener" | ||
unoconv -l & | ||
|
||
/opt/docspell-joex/bin/docspell-joex "$@" | ||
|