add missing prod files

This commit is contained in:
2025-11-21 15:03:44 -07:00
parent e3ece13c9b
commit 34ed5b9222
3 changed files with 89 additions and 0 deletions

53
Dockerfile Normal file
View File

@@ -0,0 +1,53 @@
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/go/dockerfile-reference/
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7
ARG PYTHON_VERSION=3.11.5
FROM python:${PYTHON_VERSION}-slim as base
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
# Set timezone in the container
ENV TZ="America/Detroit"
WORKDIR /app
# Create a non-privileged user that the app will run under.
# See https://docs.docker.com/go/dockerfile-user-best-practices/
ARG UID=10001
RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
appuser
# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.cache/pip to speed up subsequent builds.
# Leverage a bind mount to requirements.txt to avoid having to copy them into
# into this layer.
RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
python -m pip install -r requirements.txt
# Switch to the non-privileged user to run the application.
USER appuser
# Copy the source code into the container.
COPY . .
# Expose the port that the application listens on.
EXPOSE 8000
CMD ["python3", "src/bot_core.py", "database.ini", "discord.token", "1128111628471255050", "1441504341797371996"]

5
compose.yaml Normal file
View File

@@ -0,0 +1,5 @@
services:
very-bad:
build:
context: .
dockerfile: Dockerfile

31
requirements.txt Normal file
View File

@@ -0,0 +1,31 @@
aiohappyeyeballs==2.4.4
aiohttp==3.11.11
aiosignal==1.3.1
astroid==3.2.4
attrs==23.2.0
Brotli==1.0.9
certifi==2024.12.14
charset-normalizer==2.0.4
dill==0.3.8
discord.py==2.4.0
frozenlist==1.4.1
idna==3.7
iniconfig==2.0.0
isort==5.13.2
mccabe==0.7.0
multidict==6.0.5
packaging==24.1
pip==23.3.1
platformdirs==4.2.2
pluggy==1.5.0
propcache==0.2.1
psycopg2-binary==2.9.9
pylint==3.2.6
PySocks==1.7.1
pytest==8.2.2
requests==2.32.5
setuptools==80.9.0
tomlkit==0.13.2
urllib3==2.5.0
wheel==0.41.2
yarl==1.18.3