1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
tux/Dockerfile
kzndotsh 7cda11c4bc feat: add Dockerfile and docker-compose.yml for containerization
chore: remove old infra files as they are replaced by Docker setup
refactor: switch from systemd service to Docker for better portability and easier setup
2024-06-11 05:18:25 +00:00

31 lines
855 B
Docker

FROM python:3.12-slim
WORKDIR /app
# Install dependencies for cairo and other utilities
RUN apt-get update && apt-get install -y \
libcairo2 \
libpango1.0-0 \
libpangocairo-1.0-0 \
libgdk-pixbuf2.0-0 \
libffi-dev \
shared-mime-info \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy Poetry files and install dependencies
COPY pyproject.toml poetry.lock /app/
RUN pip install poetry \
&& poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
# Copy the remaining project files
COPY . /app
RUN mkdir -p /app/.cache/prisma && chmod +x /app/.cache/prisma
# Set PYTHONPATH environment variable to /app
ENV PYTHONPATH=/app
# Removing entrypoint and using CMD instead for better debugging
CMD ["sh", "-c", "ls && poetry run prisma generate && poetry run python tux/main.py"]