forked from joenano/rpscrape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 874 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM --platform=linux/amd64 python:3.10-slim-buster
# Set working directory
WORKDIR /app
# Install system dependencies in a single layer to reduce image size
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
build-essential && \
rm -rf /var/lib/apt/lists/*
# Upgrade pip and install Python dependencies
COPY requirements.txt requirements.in ./
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY RPScraper/ /app/RPScraper/
COPY tests/ /app/tests/
# Set environment variables
ENV PROJECTSPATH=/app/RPScraper
ENV PYTHONPATH=/app
# Set execute permissions for scripts
RUN chmod +x RPScraper/scripts/full_refresh.sh \
RPScraper/scripts/run_daily_updates.sh
# Default command to run daily updates
CMD ["/app/RPScraper/scripts/run_daily_updates.sh"]