fix: update Dockerfile and documentation for APT_CACHER_NG configuration
Some checks failed
CI/CD Pipeline / test (push) Successful in 18s
CI/CD Pipeline / build (push) Successful in 1m3s
CI/CD Pipeline / push (push) Failing after 35s

This commit is contained in:
2025-11-01 19:41:58 +01:00
parent a51d500777
commit fee955f01d
4 changed files with 10 additions and 5 deletions

View File

@@ -5,11 +5,9 @@ FROM python:3.11-slim-bookworm
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV FLASK_ENV=production
ENV FLASK_SECRET=production-secret-change-me
ENV APT_CACHER_NG=http://192.168.88.14:3142
# Add apt-cacher-ng configuration
RUN echo 'Acquire::http { Proxy "'"$APT_CACHER_NG"'/"; };' > /etc/apt/apt.conf.d/01proxy
# Add apt-cacher-ng configuration (if APT_CACHER_NG is set)
RUN if [ -n "$APT_CACHER_NG" ]; then echo 'Acquire::http { Proxy "'"$APT_CACHER_NG"'/"; };' > /etc/apt/apt.conf.d/01proxy; fi
# Install system dependencies
RUN apt-get update && apt-get install -y \

View File

@@ -58,7 +58,8 @@ This application is a Craigslist job scraper with a Flask web interface.
### Environment Variables
- `FLASK_ENV`: Set to `production`
- `FLASK_SECRET`: Secret key for Flask sessions
- `FLASK_SECRET`: Secret key for Flask sessions (required)
- `APT_CACHER_NG`: Optional URL for apt-cacher-ng proxy to speed up package downloads (e.g., `http://192.168.88.14:3142`)
### Database Configuration
@@ -309,6 +310,7 @@ services:
# Optional configuration
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-4}
- APT_CACHER_NG=${APT_CACHER_NG}
volumes:
- type: bind
source: ./cache

View File

@@ -39,3 +39,7 @@ The application includes an automated scheduler that runs the job scraping proce
- **Testing**: Comprehensive test suite in `tests/test_scheduler.py`
To modify the scheduling interval, edit the `start_scheduler()` function in `web/craigslist.py`.
## Docker Deployment
Please see [README-Docker.md](README-Docker.md) for instructions on deploying the application using Docker.

View File

@@ -18,6 +18,7 @@ services:
# Optional configuration
- GUNICORN_WORKERS=${GUNICORN_WORKERS:-4}
- APT_CACHER_NG=${APT_CACHER_NG}
volumes:
- type: bind
source: ./cache