mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2025-12-20 04:21:13 -05:00
feat(docker): update Dockerfile and entrypoint script for Python path configuration and package verification
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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=$!
|
||||||
|
|||||||
Reference in New Issue
Block a user