feat(docker): simplify PYTHONPATH configuration and update entrypoint script to change directory before starting the application

This commit is contained in:
pacnpal
2025-01-28 21:15:59 +00:00
parent 58246b6704
commit 01c0098a73
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
# Set Python path to include src directory # Set Python path to include src directory
ENV PYTHONPATH="/app/src:${PYTHONPATH}" ENV PYTHONPATH=/app/src
# Install the package in editable mode # Install the package in editable mode
RUN pip install -e . RUN pip install -e .

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..."
PYTHONPATH=/app/src python -m simpleguardhome.main & cd /app && PYTHONPATH=/app/src python3 -m simpleguardhome.main &
# Store child PID # Store child PID
child=$! child=$!