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
|
!requirements.txt
|
||||||
!docker-entrypoint.sh
|
!docker-entrypoint.sh
|
||||||
!healthcheck.py
|
!healthcheck.py
|
||||||
|
!setup.py
|
||||||
|
!pyproject.toml
|
||||||
|
!MANIFEST.in
|
||||||
|
|
||||||
# VERIFICATION: Required files that MUST exist:
|
# VERIFICATION: Required files that MUST exist:
|
||||||
# - src/simpleguardhome/__init__.py
|
# - src/simpleguardhome/__init__.py
|
||||||
@@ -23,6 +26,7 @@
|
|||||||
# - src/simpleguardhome/templates/index.html
|
# - src/simpleguardhome/templates/index.html
|
||||||
# - src/simpleguardhome/favicon.ico
|
# - src/simpleguardhome/favicon.ico
|
||||||
# - healthcheck.py
|
# - healthcheck.py
|
||||||
|
# - setup.py
|
||||||
|
|
||||||
# SAFETY: Never include these files even if allowed above
|
# SAFETY: Never include these files even if allowed above
|
||||||
**/__pycache__/
|
**/__pycache__/
|
||||||
|
|||||||
14
Dockerfile
14
Dockerfile
@@ -13,13 +13,12 @@ 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 the source code
|
# Copy package files
|
||||||
COPY . .
|
COPY setup.py pyproject.toml MANIFEST.in ./
|
||||||
|
COPY src ./src
|
||||||
|
|
||||||
# Clean any previous installations and install the package
|
# Install the package
|
||||||
RUN pip uninstall -y simpleguardhome || true && \
|
RUN pip install -e . && \
|
||||||
pip install -e . && \
|
|
||||||
pip show simpleguardhome && \
|
|
||||||
python3 -c "import simpleguardhome; print('Package found at:', simpleguardhome.__file__)"
|
python3 -c "import simpleguardhome; print('Package found at:', simpleguardhome.__file__)"
|
||||||
|
|
||||||
# Set up health check
|
# Set up health check
|
||||||
@@ -36,6 +35,9 @@ ENV ADGUARD_HOST="http://localhost" \
|
|||||||
# Expose application port
|
# Expose application port
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Create rules_backup directory with proper permissions
|
||||||
|
RUN mkdir -p rules_backup && chmod 777 rules_backup
|
||||||
|
|
||||||
# Copy and set up entrypoint
|
# Copy and set up entrypoint
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user