diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a4aa2d8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ + .git + __pycache__ + *.pyc + *.pyo + *.pyd + .venv + .env + output/ \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fe5b906..4243d1f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,3 +14,7 @@ jobs: - name: build image run: | docker build . -t arnaudcayrol/immich-selfie-timelapse:latest + - name: push image to docker hub + run: | + docker login -u arnaudcayrol -p ${{ secrets.DOCKERHUB_TOKEN }} + docker push arnaudcayrol/immich-selfie-timelapse:latest diff --git a/.gitignore b/.gitignore index d208dff..537f266 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dlib-19.24.99-cp312-cp312-win_amd64.whl mmod_human_face_detector.dat shape_predictor_68_face_landmarks.dat output/ +__pycache__/ diff --git a/Dockerfile b/Dockerfile index bc9373c..369179c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /app # Copy requirements first to leverage Docker cache -COPY requirements.txt . +COPY . . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt @@ -27,17 +27,9 @@ RUN apt-get update && apt-get install -y wget && \ apt-get autoremove -y && \ rm -rf /var/lib/apt/lists/* -# Copy the application code -COPY image_processing.py . -COPY main.py . -COPY templates/ templates/. -COPY compile_timelapse.py . -COPY immich_api.py . - # Create output directory RUN mkdir -p /app/output - # Expose the port the app runs on EXPOSE 5000