another file to revert

This commit is contained in:
dekzter 2025-03-03 17:48:34 -05:00
parent 8603aa5069
commit 1c5d13bab2

View file

@ -26,18 +26,10 @@ RUN apt-get update && \
pip install --no-cache-dir -r requirements-sentence-transformers.txt && \
echo "installing sentence-transformers" && \
pip install sentence-transformers==3.4.1 && \
python manage.py collectstatic --noinput || true && \
cd /app/frontend && \
npm install && \
npm run build && \
find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; && \
echo "Aggressively remove build-only packages and caches" && \
apt-get purge -y \
curl \
gcc \
git \
nodejs \
wget
FROM python:3.13-slim
@ -46,63 +38,48 @@ ENV PATH="/dispatcharrpy/bin:$PATH" \
DJANGO_SETTINGS_MODULE=dispatcharr.settings \
PYTHONUNBUFFERED=1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ffmpeg \
gnupg2 \
gpg \
libpq-dev \
lsb-release \
nginx \
procps \
streamlink \
wget && \
echo "=== setting up postgres ====" && \
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 - && \
echo "=== setting up redis ===" && \
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg && \
chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list && \
apt-get update && \
apt-get install -y \
postgresql-14 \
postgresql-contrib-14 \
redis-server && \
mkdir /data && \
apt-get remove -y \
gnupg2 \
gpg \
lsb-release && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
COPY docker/nginx.conf /etc/nginx/sites-enabled/default
# Copy the virtual environment and application from the builder stage
COPY --from=builder /dispatcharrpy /dispatcharrpy
COPY --from=builder /app /app
RUN apt-get update && \
apt-get install -y \
curl \
ffmpeg \
gcc \
git \
gpg \
libpq-dev \
lsb-release \
python3-virtualenv \
streamlink
RUN \
curl -sL https://deb.nodesource.com/setup_23.x -o /tmp/nodesource_setup.sh && \
bash /tmp/nodesource_setup.sh && \
curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg && \
chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list && \
cp /app/docker/nginx.conf /etc/nginx/sites-enabled/default && \
apt-get update && \
apt-get install -y redis
RUN apt-get update && \
apt-get install -y \
nodejs \
redis
RUN \
mkdir /data && \
virtualenv /dispatcharrpy && \
git clone https://github.com/Dispatcharr/Dispatcharr /app && \
cd /app && \
pip install --no-cache-dir -r requirements.txt && \
cd /app/frontend && \
npm install && \
npm run build && \
find . -maxdepth 1 ! -name '.' ! -name 'build' -exec rm -rf '{}' \; && \
cd /app && \
python manage.py collectstatic --noinput || true && \
apt-get remove -y \
gcc \
git \
gpg \
libpq-dev \
lsb-release \
nodejs && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
WORKDIR /app
CMD ["/app/docker/entrypoint.aio.sh"]
CMD ["/app/docker/entrypoint.sh"]