feat(docker): create rules backup directory and configure volume for persistence

This commit is contained in:
pacnpal
2025-01-28 14:35:16 -05:00
parent 6491d9356a
commit 438db5ebeb

View File

@@ -22,6 +22,10 @@ COPY . .
# Install the package in editable mode # Install the package in editable mode
RUN pip install -e . RUN pip install -e .
# Create rules backup directory with proper permissions
RUN mkdir -p /app/rules_backup && \
chmod 777 /app/rules_backup
# Default environment variables # Default environment variables
ENV ADGUARD_HOST="http://localhost" \ ENV ADGUARD_HOST="http://localhost" \
ADGUARD_PORT=3000 ADGUARD_PORT=3000
@@ -29,5 +33,8 @@ ENV ADGUARD_HOST="http://localhost" \
# Expose the application port # Expose the application port
EXPOSE 8000 EXPOSE 8000
# Volume for persisting rules backups
VOLUME ["/app/rules_backup"]
# Command to run the application # Command to run the application
CMD ["python", "-m", "simpleguardhome.main"] CMD ["python", "-m", "simpleguardhome.main"]