Add a deploy step

This commit is contained in:
Arnaud_Cayrol 2025-04-13 13:50:48 +02:00
parent 03e811cede
commit 211c65699d
4 changed files with 14 additions and 9 deletions

8
.dockerignore Normal file
View file

@ -0,0 +1,8 @@
.git
__pycache__
*.pyc
*.pyo
*.pyd
.venv
.env
output/

View file

@ -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

1
.gitignore vendored
View file

@ -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__/

View file

@ -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