Root: - Add comprehensive .gitignore covering all subprojects Seeder API (Node.js): - Add Dockerfile with multi-stage build, non-root user, health check - Add .dockerignore and .gitignore Job Scraper (Python): - Add Dockerfile with Python 3.12, non-root user - Add .dockerignore and .gitignore Existing backend/frontend Dockerfiles and .dockerignore already optimized
25 lines
564 B
Docker
25 lines
564 B
Docker
# =============================================================================
|
|
# GoHorse Jobs Scraper - Python Dockerfile
|
|
# =============================================================================
|
|
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy source
|
|
COPY . .
|
|
|
|
# Security: Run as non-root
|
|
RUN useradd -m -u 1001 scraper && \
|
|
chown -R scraper:scraper /app
|
|
|
|
USER scraper
|
|
|
|
# Create output directory
|
|
RUN mkdir -p /app/output
|
|
|
|
CMD ["python", "main_scraper.py"]
|