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
Robert Ross
committed
Jan 22, 2024
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="[email protected]" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
# elodie-docker | ||
|
||
Docker container for [Elodie](https://github.com/jmathai/elodie) | ||
Docker container for a more recently updated fork of [Elodie](https://github.com/D3Zyre/Elodie.git) | ||
|
||
<p align="center"><img src ="https://raw.githubusercontent.com/jmathai/elodie/master/creative/[email protected]" /></p> | ||
<p align="center"><img src ="https://raw.githubusercontent.com/D3Zyre/elodie/master/creative/[email protected]" /></p> | ||
|
||
|
||
The container default command is to watch a source folder using `inotifywait` and automatically execute `elodie` to import added images to a destination folder. | ||
The container default command is to watch a source folder using `inotifywait` or [`inotifywait-polling`](https://github.com/javanile/inotifywait-polling) and automatically execute `elodie` to import added images to a destination folder. | ||
|
||
## Usage | ||
|
||
|
@@ -32,10 +31,11 @@ docker run \ | |
| DESTINATION | /destination | Copy imported files into this directory | ||
| TRASH | | Set to move files to this trash folder after copying files | ||
| EXCLUDE | | Regular expression for directories or files to exclude | ||
| ALLOW_DUPLICATE | | Set to import the files even if theu have already been imported | ||
| ALLOW_DUPLICATE | | Set to import the files even if theu have already been imported | ||
| ALBUM_FROM_FOLDER | | Set to use images' folders as their album names | ||
| MAPQUEST_KEY | | Mapquest API key for geo-code location from EXIF's GPS fields | ||
| DEBUG | | Set to enable debug messages | ||
| INOTIFYWAIT_POLLING | | Set to enable use of inotifywait polling. Useful for CIFS/SMB/NFS mounts. | ||
|
||
### Advanced configurtion | ||
|
||
|
@@ -53,7 +53,7 @@ docker run \ | |
pbuyle/elodie | ||
``` | ||
|
||
Note: If a custom configuartion file is used then setting the `MAPQUEST_KEY` environment variable will have not effect. | ||
Note: If a custom configuration file is used then setting the `MAPQUEST_KEY` environment variable will have not effect. | ||
|
||
### User / Group Identifiers | ||
|
||
|
@@ -62,7 +62,8 @@ When using volumes (-v flags) permissions issues can arise between the host OS a | |
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. | ||
|
||
In this instance PUID=1000 and PGID=1000, to find yours use id user as below: | ||
|
||
``` | ||
$ id username | ||
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) | ||
``` | ||
``` |
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.