diff options
-rw-r--r-- | Containerfile | 39 | ||||
-rwxr-xr-x | readme.md | 21 | ||||
-rwxr-xr-x | requirements.txt | 35 |
3 files changed, 78 insertions, 17 deletions
diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..01d7b07 --- /dev/null +++ b/Containerfile @@ -0,0 +1,39 @@ +FROM ghcr.io/void-linux/void-musl:d1ee412 + +RUN xbps-install -Suy \ + make \ + gcc \ + shadow \ + python3 \ + python3-async-timeout \ + python3-GitPython \ + python3-colorama \ + python3-dateutil \ + python3-pytz \ + python3-google-api-core \ + python3-google-api-python-client \ + python3-google-auth \ + python3-google-auth-oauthlib \ + python3-Pillow \ + python3-pynacl \ + python3-requests \ + python3-six \ + python3-virtualenv \ + python3-youtube-dl + +RUN useradd --no-create-home --shell /bin/sh app +USER app + +WORKDIR /app + +RUN virtualenv --system-site-packages venv +ADD requirements.txt requirements.txt +RUN venv/bin/pip install -r requirements.txt + +COPY main.py bot.py palette.png ./ +COPY --chown=app:app utils ./utils +RUN cd utils && make +COPY bc_funcs ./bc_funcs +COPY cogs ./cogs + +CMD [ "venv/bin/python3", "./main.py" ] @@ -23,3 +23,24 @@ A user added as a botmaster will be able to edit the config via discord with the This bot was built as a fork of [celesteBot](https://github.com/CelesteClassic/celestebot), so a lot of code is recycled. Feel free to make a pull request or use the code here. + +## Container + +The discord bot can be ran into a container as well. To build the +container simply run + +```sh +podman build -t steve-bot . +``` + +And to start it + +```sh +podman run \ + --volume="./api_keys.json:/app/api_keys.json"\ + --volume="./config.json:/app/config.json" \ + --volume="./custom_commands.json:/app/custom_commands.json" \ + --volume="./fair.json:/app/fair.json" \ + --volume="./runs_blacklist.json:/app/runs_blacklist.json" \ + -it steve-bot:latest +``` diff --git a/requirements.txt b/requirements.txt index fedc556..6bf0648 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,18 @@ -discord.py==2.3.2 -colorama==0.4.6 -GitPython==3.1.31 -google-api-core==2.11.0 -google-auth==2.16.2 -google-cloud-core==2.4.1 -google-cloud-translate==3.14.0 -googleapis-common-protos==1.58.0 -pathlib2==2.3.7.post1 -Pillow==10.2.0 -PyNaCl==1.5.0 -python-dateutil==2.8.2 -requests==2.31.0 -selenium==4.16.0 -six==1.16.0 -subprocess32==3.5.4 -youtube_dl==2021.12.17 +discord.py>=2.3.2 +colorama>=0.4.6 +GitPython>=3.1.31 +google-api-core>=2.11.0 +google-auth>=2.16.2 +google-cloud-core>=2.4.1 +google-cloud-translate>=3.14.0 +googleapis-common-protos>=1.58.0 +pathlib2>=2.3.7.post1 +Pillow>=10.2.0 +PyNaCl>=1.5.0 +python-dateutil>=2.8.2 +pytz>=2024.1 +requests>=2.31.0 +selenium>=4.16.0 +six>=1.16.0 +subprocess32>=3.5.4 +youtube_dl>=2021.12.17 |