init
This commit is contained in:
commit
68b6a87b14
25 changed files with 871 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
# Install Python and pip
|
||||
RUN apt-get update && \
|
||||
apt-get install -y python3 python3-pip python3-venv && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
|
||||
# Install Python dependencies
|
||||
RUN python3 -m pip install --no-cache-dir -r /tmp/requirements.txt --break-system-packages
|
||||
|
||||
# Copy Python script to /usr/local/bin so it survives volume mounts
|
||||
COPY picopaper.py /usr/local/bin/picopaper.py
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Add /app to Python path so it can find config.py from mounted volume
|
||||
ENV PYTHONPATH=/app
|
||||
|
||||
# Run as root to allow writing to mounted volumes
|
||||
# (The mounted volume will have host user permissions)
|
||||
|
||||
# Generate the site on container start
|
||||
CMD ["python3", "/usr/local/bin/picopaper.py"]
|
Loading…
Add table
Add a link
Reference in a new issue