forked from pbuyle/docker-elodie
-
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.
Switch to using
D3Zyre/Elodie
fork and include `inotifywait-polling…
…` option.
- Loading branch information
1 parent
7fae8a6
commit 0d03819
Showing
5 changed files
with
286 additions
and
32 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,26 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Docker Login | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKER_USER}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
- name: Docker Build | ||
run: docker build . --file Dockerfile --tag ${{secrets.DOCKER_USER}}/elodie:$(date +%s) --tag ${{secrets.DOCKER_USER}}/elodie:latest | ||
- name: Docker Publish | ||
run: docker push --all-tags ${{secrets.DOCKER_USER}}/elodie |
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 |
---|---|---|
@@ -1,50 +1,54 @@ | ||
FROM python:3-alpine AS builder | ||
FROM python:3.9-alpine AS builder | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install runtime dependencies | ||
RUN apk --update upgrade && \ | ||
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec && \ | ||
rm -rf /var/cache/apk/* | ||
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
# Install build dependencies | ||
RUN apk --update upgrade && \ | ||
apk add --update git \ | ||
build-base \ | ||
jpeg-dev \ | ||
zlib-dev \ | ||
lcms2-dev \ | ||
openjpeg-dev \ | ||
tiff-dev && \ | ||
rm -rf /var/cache/apk/* | ||
apk add --update git \ | ||
build-base \ | ||
jpeg-dev \ | ||
zlib-dev \ | ||
lcms2-dev \ | ||
openjpeg-dev \ | ||
tiff-dev && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
WORKDIR /wheels | ||
RUN git clone https://github.com/jmathai/elodie.git /elodie && \ | ||
pip wheel --no-cache-dir -r /elodie/requirements.txt && \ | ||
rm -rf /elodie/.git | ||
RUN git clone https://github.com/D3Zyre/Elodie.git /elodie && \ | ||
pip wheel --no-cache-dir -r /elodie/requirements.txt && \ | ||
rm -rf /elodie/.git | ||
|
||
#Using internal modified copy of file for now | ||
#RUN git clone https://github.com/javanile/inotifywait-polling.git /inotifywait-polling && \ | ||
# chmod +x /inotifywait-polling/inotifywait-polling.sh | ||
|
||
FROM python:3-alpine | ||
FROM python:3.9-alpine | ||
LABEL maintainer="pierre@buyle.org" | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Install runtime dependencies | ||
RUN apk --update upgrade && \ | ||
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec && \ | ||
rm -rf /var/cache/apk/* | ||
apk add --update inotify-tools exiftool zlib jpeg lcms2 tiff openjpeg su-exec bash findutils && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
COPY --from=builder /wheels /wheels | ||
COPY --from=builder /elodie /elodie | ||
#COPY --from=builder /inotifywait-polling/inotifywait-polling.sh /usr/local/bin/inotifywait-polling | ||
|
||
WORKDIR /elodie | ||
RUN pip install --no-cache-dir -r requirements.txt -f /wheels && \ | ||
rm -rf /wheels | ||
rm -rf /wheels | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
COPY --chown=root:root --chmod=0777 inotifywait-polling.sh /usr/local/bin/inotifywait-polling | ||
|
||
ENV PUID=1000 | ||
ENV PGID=1000 | ||
ENV SOURCE=/source | ||
ENV DESTINATION=/destination | ||
ENV ELODIE_APPLICATION_DIRECTORY=/elodie | ||
ENV DEFAULT_COMMAND=watch | ||
ENV ELODIE_APPLICATION_DIRECTORY=~/.elodie | ||
ENV ELODIE_DEFAULT_COMMAND=watch | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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
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
Oops, something went wrong.