mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2025-12-20 04:21:13 -05:00
refactor(docker): simplify Dockerfile by copying package directly for easier imports and streamline entrypoint script
This commit is contained in:
@@ -13,8 +13,8 @@ RUN apt-get update && \
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copy source code
|
# Copy the package directly to /app for simpler imports
|
||||||
COPY src /app/src
|
COPY src/simpleguardhome /app/simpleguardhome
|
||||||
|
|
||||||
# Create rules_backup directory with proper permissions
|
# Create rules_backup directory with proper permissions
|
||||||
RUN mkdir -p rules_backup && chmod 777 rules_backup
|
RUN mkdir -p rules_backup && chmod 777 rules_backup
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ set -e
|
|||||||
|
|
||||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting SimpleGuardHome..."
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting SimpleGuardHome..."
|
||||||
|
|
||||||
# Run the app with src in Python path to find the module
|
# Just run uvicorn pointing to the app
|
||||||
PYTHONPATH=/app/src exec python3 -m uvicorn simpleguardhome.main:app --host 0.0.0.0 --port 8000
|
exec python3 -m uvicorn simpleguardhome.main:app --host 0.0.0.0 --port 8000
|
||||||
Reference in New Issue
Block a user