Skip to content

Commit 5b65e65

Browse files
committed
dockerfile improvements, manyvids link fix
1 parent 7140d0d commit 5b65e65

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

Dockerfile

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Build Stage
2-
FROM python:3.11.3-slim AS build
2+
FROM python:3.11-slim-bullseye AS build
33

44
ENV DEBIAN_FRONTEND=noninteractive
5-
6-
RUN apt update -y && apt install -y git
5+
# Build dummy packages to skip installing them and their dependencies -- Copied from FlareSolverr
6+
RUN apt update -y && apt install -y git \
7+
&& apt-get install -y --no-install-recommends equivs \
8+
&& equivs-control libgl1-mesa-dri \
9+
&& 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 \
10+
&& equivs-build libgl1-mesa-dri \
11+
&& mv libgl1-mesa-dri_*.deb /libgl1-mesa-dri.deb \
12+
&& equivs-control adwaita-icon-theme \
13+
&& 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 \
14+
&& equivs-build adwaita-icon-theme \
15+
&& mv adwaita-icon-theme_*.deb /adwaita-icon-theme.deb
716

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

1524
# Buidling final image, moving over venv
16-
FROM python:3.11.3-slim
17-
18-
ENV DEBIAN_FRONTEND=noninteractive
25+
FROM python:3.11-slim-bullseye
1926

2027
WORKDIR /opt/SassBot
2128

22-
RUN apt update -y && apt install -y --no-install-recommends chromium xvfb
23-
24-
COPY --from=build /venv /venv
29+
ENV DEBIAN_FRONTEND=noninteractive
2530
ENV PATH=/venv/bin:$PATH
31+
COPY --from=build /*.deb /
32+
COPY --from=build /venv /venv
33+
34+
RUN apt update -y && apt install -y --no-install-recommends chromium xvfb \
35+
# Remove temporary files and hardware decoding libraries -- Copied from FlareSolverr
36+
&& rm -rf /var/lib/apt/lists/* \
37+
&& rm -f /usr/lib/x86_64-linux-gnu/libmfxhw* \
38+
&& rm -f /usr/lib/x86_64-linux-gnu/mfx/*
2639

2740
COPY . .
2841

utils/Notifications.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async def EpNotification(rest: hikari.impl.RESTClientImpl, title, largeThumbnail
261261
await rest.create_message(channel = Constants.EP_NOTIFICATION_CHANNEL_ID, content = messageContent, embed=epEmbed, mentions_everyone= IS_PING, role_mentions=IS_PING)
262262

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

0 commit comments

Comments
 (0)