mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2025-12-19 20:11:14 -05:00
refactor(docker): update Dockerfile and .dockerignore to streamline package installation and include necessary files
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
!requirements.txt
|
||||
!docker-entrypoint.sh
|
||||
!healthcheck.py
|
||||
!setup.py
|
||||
!pyproject.toml
|
||||
!MANIFEST.in
|
||||
|
||||
# VERIFICATION: Required files that MUST exist:
|
||||
# - src/simpleguardhome/__init__.py
|
||||
@@ -23,6 +26,7 @@
|
||||
# - src/simpleguardhome/templates/index.html
|
||||
# - src/simpleguardhome/favicon.ico
|
||||
# - healthcheck.py
|
||||
# - setup.py
|
||||
|
||||
# SAFETY: Never include these files even if allowed above
|
||||
**/__pycache__/
|
||||
|
||||
14
Dockerfile
14
Dockerfile
@@ -13,13 +13,12 @@ RUN apt-get update && \
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the source code
|
||||
COPY . .
|
||||
# Copy package files
|
||||
COPY setup.py pyproject.toml MANIFEST.in ./
|
||||
COPY src ./src
|
||||
|
||||
# Clean any previous installations and install the package
|
||||
RUN pip uninstall -y simpleguardhome || true && \
|
||||
pip install -e . && \
|
||||
pip show simpleguardhome && \
|
||||
# Install the package
|
||||
RUN pip install -e . && \
|
||||
python3 -c "import simpleguardhome; print('Package found at:', simpleguardhome.__file__)"
|
||||
|
||||
# Set up health check
|
||||
@@ -36,6 +35,9 @@ ENV ADGUARD_HOST="http://localhost" \
|
||||
# Expose application port
|
||||
EXPOSE 8000
|
||||
|
||||
# Create rules_backup directory with proper permissions
|
||||
RUN mkdir -p rules_backup && chmod 777 rules_backup
|
||||
|
||||
# Copy and set up entrypoint
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user