From 58246b670481a82da793842535d115c4419b3898 Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Tue, 28 Jan 2025 21:13:53 +0000 Subject: [PATCH] feat(docker): update Dockerfile and entrypoint script for Python path configuration and package verification --- Dockerfile | 6 ++++++ docker-entrypoint.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e68f7e..a629016 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,15 @@ RUN pip install --no-cache-dir -r requirements.txt # Copy the source code COPY . . +# Set Python path to include src directory +ENV PYTHONPATH="/app/src:${PYTHONPATH}" + # Install the package in editable mode RUN pip install -e . +# Verify package installation +RUN pip show simpleguardhome + # Copy and set up entrypoint script COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 97533fb..bb0ffdd 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -14,7 +14,7 @@ trap handle_term SIGTERM SIGINT # Start the application echo "Starting SimpleGuardHome server..." -python -m simpleguardhome.main & +PYTHONPATH=/app/src python -m simpleguardhome.main & # Store child PID child=$!