Skip to content

Commit

Permalink
dockerfile improvements, manyvids link fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Bombg committed Nov 22, 2024
1 parent 7140d0d commit 5b65e65
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
31 changes: 22 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Build Stage
FROM python:3.11.3-slim AS build
FROM python:3.11-slim-bullseye AS build

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update -y && apt install -y git
# Build dummy packages to skip installing them and their dependencies -- Copied from FlareSolverr
RUN apt update -y && apt install -y git \
&& apt-get install -y --no-install-recommends equivs \
&& equivs-control libgl1-mesa-dri \
&& printf 'Section: misc\nPriority: optional\nStandards-Version: 3.9.2\nPackage: libgl1-mesa-dri\nVersion: 99.0.0\nDescription: Dummy package for libgl1-mesa-dri\n' >> libgl1-mesa-dri \
&& equivs-build libgl1-mesa-dri \
&& mv libgl1-mesa-dri_*.deb /libgl1-mesa-dri.deb \
&& equivs-control adwaita-icon-theme \
&& printf 'Section: misc\nPriority: optional\nStandards-Version: 3.9.2\nPackage: adwaita-icon-theme\nVersion: 99.0.0\nDescription: Dummy package for adwaita-icon-theme\n' >> adwaita-icon-theme \
&& equivs-build adwaita-icon-theme \
&& mv adwaita-icon-theme_*.deb /adwaita-icon-theme.deb

RUN python3 -m venv /venv
ENV PATH=/venv/bin:$PATH
Expand All @@ -13,16 +22,20 @@ RUN pip install -r requirements.txt && \
pip install uvloop

# Buidling final image, moving over venv
FROM python:3.11.3-slim

ENV DEBIAN_FRONTEND=noninteractive
FROM python:3.11-slim-bullseye

WORKDIR /opt/SassBot

RUN apt update -y && apt install -y --no-install-recommends chromium xvfb

COPY --from=build /venv /venv
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH=/venv/bin:$PATH
COPY --from=build /*.deb /
COPY --from=build /venv /venv

RUN apt update -y && apt install -y --no-install-recommends chromium xvfb \
# Remove temporary files and hardware decoding libraries -- Copied from FlareSolverr
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /usr/lib/x86_64-linux-gnu/libmfxhw* \
&& rm -f /usr/lib/x86_64-linux-gnu/mfx/*

COPY . .

Expand Down
2 changes: 1 addition & 1 deletion utils/Notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ async def EpNotification(rest: hikari.impl.RESTClientImpl, title, largeThumbnail
await rest.create_message(channel = Constants.EP_NOTIFICATION_CHANNEL_ID, content = messageContent, embed=epEmbed, mentions_everyone= IS_PING, role_mentions=IS_PING)

async def MvNotification(rest: hikari.impl.RESTClientImpl, title, largeThumbnail, icon, mvUserName, isRerun):
mvLiveStreamUrl = f"https://www.manyvids.com/live/cam/{mvUserName}"
mvLiveStreamUrl = f"https://www.manyvids.com/live/cam/{mvUserName.lower()}"
mvOnlineText = Constants.mvAboveEmbedText + "\n<" + mvLiveStreamUrl + ">"
embedMaker = EmbedCreator(
Constants.mvBelowTitleText,
Expand Down

0 comments on commit 5b65e65

Please sign in to comment.