feat(docker): update Dockerfile and entrypoint script for Python path configuration and package verification

This commit is contained in:
pacnpal
2025-01-28 21:13:53 +00:00
parent b1c6d188d4
commit 58246b6704
2 changed files with 7 additions and 1 deletions

View File

@@ -19,9 +19,15 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy the source code # Copy the source code
COPY . . COPY . .
# Set Python path to include src directory
ENV PYTHONPATH="/app/src:${PYTHONPATH}"
# Install the package in editable mode # Install the package in editable mode
RUN pip install -e . RUN pip install -e .
# Verify package installation
RUN pip show simpleguardhome
# Copy and set up entrypoint script # Copy and set up entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh

View File

@@ -14,7 +14,7 @@ trap handle_term SIGTERM SIGINT
# Start the application # Start the application
echo "Starting SimpleGuardHome server..." echo "Starting SimpleGuardHome server..."
python -m simpleguardhome.main & PYTHONPATH=/app/src python -m simpleguardhome.main &
# Store child PID # Store child PID
child=$! child=$!