mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
47 lines
1.2 KiB
Text
Executable file
47 lines
1.2 KiB
Text
Executable file
FROM python:3.10-slim
|
|
|
|
ENV API_PORT=5656
|
|
|
|
# Add PostgreSQL repository
|
|
RUN apt-get update && apt-get install -y wget gnupg2 && \
|
|
echo "deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
|
|
|
|
# Install required packages
|
|
RUN apt-get update && apt-get install -y \
|
|
ffmpeg \
|
|
streamlink \
|
|
vlc \
|
|
libpq-dev \
|
|
gcc \
|
|
postgresql-14 \
|
|
postgresql-contrib-14 \
|
|
redis-server \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements.txt from the parent directory
|
|
COPY requirements.txt /app/
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
# Copy the application source code from the parent directory
|
|
COPY . /app/
|
|
|
|
# Set environment variables
|
|
ENV DJANGO_SETTINGS_MODULE=dispatcharr.settings
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
|
|
|
|
# Copy the entrypoint script
|
|
COPY docker/entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
# Expose the port
|
|
EXPOSE 9191
|
|
|
|
# Command to run the startup script
|
|
CMD ["/app/entrypoint.sh"]
|