Skip to content

Commit

Permalink
Merge branch 'master' into logviewer-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
raidensakura committed Jun 14, 2024
2 parents fc25015 + 30bd958 commit c55bab7
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 12 deletions.
42 changes: 30 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
FROM python:3.10 as py
FROM python:3.11-slim-bookworm as base

FROM py as build
RUN apt-get update && \
apt-get install --no-install-recommends -y \
# Install CairoSVG dependencies.
libcairo2 && \
# Cleanup APT.
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
# Create a non-root user.
useradd --shell /usr/sbin/nologin --create-home -d /opt/modmail modmail

RUN apt update && apt install -y g++ git
FROM base as builder

COPY requirements.txt /
RUN pip install --prefix=/inst -U -r /requirements.txt
COPY requirements.txt .

FROM py
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade pip wheel && \
python -m venv /opt/modmail/.venv && \
. /opt/modmail/.venv/bin/activate && \
pip install --no-cache-dir --upgrade -r requirements.txt

COPY --from=build /inst /usr/local
FROM base

ENV USING_DOCKER yes
RUN useradd --system --no-create-home modmail
USER modmail
# Copy the entire venv.
COPY --from=builder --chown=modmail:modmail /opt/modmail/.venv /opt/modmail/.venv

# Copy repository files.
WORKDIR /opt/modmail
USER modmail:modmail
COPY --chown=modmail:modmail . .

# This sets some Python runtime variables and disables the internal auto-update.
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH=/opt/modmail/.venv/bin:$PATH \
USING_DOCKER=yes

WORKDIR /modmailbot
CMD ["python", "bot.py"]
COPY --chown=modmail:modmail . /modmailbot
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ Advertise Your Server:
</a>
<br>
<br>
Help Us • Help Other's:
<br>
<a href='https://discord.gg/5yQCFzY6HU'>
<img height=100 src='https://i.imgur.com/Gi3jxeH.gif' style='margin:5px'>
</a>
<br>
<br>
Discord Advice Center:
<br>
<a href='https://discord.gg/zmwZy5fd9v'>
Expand Down
27 changes: 27 additions & 0 deletions SPONSORS.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,32 @@
"url": "https://discord.gg/uncommon",
"title": "uncommon community"
}
},
{
"embed": {
"author": {
"name": "Help us • Help Others"
},
"title": "Join Today",
"url": "https://discord.gg/5yQCFzY6HU",
"description": "At Help Us • Help Others, we accept as true with inside the transformative electricity of cooperation and kindness. Each one people has the capability to make a meaningful impact by means of helping and caring for others. Whether you want assistance or want to offer it, this is the right region for you!",
"fields": [
{
"name": "What we offer:",
"value": "`🎬` - Active community\n`👮` - Active staff around the globe! \n`🛜` - 40+ Advertising channels to grow your socials!\n`💎` - Boosting Perks\n`🎉` - Event's monthly especially bank holiday roles!!\n`🔢` - Unique levelling systems\n`📞` - Multiple voice channels including gaming!\n`🎁` - Exclusive giveaways!"
},
{
"name": "We Are Hiring",
"value": "`🔵` - Moderators\n`🔵` - Human Resources\n`🔵` - Community Team\n`🔵` - Partnership Manager\n`🔵` - Growth Manager\n`🚀` Much more to come!\n\n\nJoin Today!"
}
],
"image": {
"url": "https://cdn.discordapp.com/attachments/1218338794416246874/1243635366326567002/AD_animated.gif"
},
"color": 45300,
"footer": {
"text": "Help Us • Help Others"
}
}
}
]

0 comments on commit c55bab7

Please sign in to comment.