From 41c7ec54589584ea5cefc78031a6243a0166ceb2 Mon Sep 17 00:00:00 2001 From: james ryan Date: Thu, 30 May 2024 16:36:32 -0400 Subject: [PATCH] added some docker-compose instructions and a lazy fix to python docker closing the script --- Dockerfile | 4 +++- README.md | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cebde53..fb73554 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,6 @@ RUN useradd -r -u ${uid} -g ${group} -s /bin/false -M ${user} # Switch to user USER ${uid}:${gid} -CMD ["python3", "./main.py"] +# lazyconfig +ENTRYPOINT python3 ./main.py +CMD tail -f /dev/null diff --git a/README.md b/README.md index 831e776..a67a7a6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # gerard-botler discord bot for a friend +this bot uses [discord.py](https://discordpy.readthedocs.io/en/stable/) # deploy stuff Clone the repo, and in the root run the container: @@ -8,6 +9,16 @@ Clone the repo, and in the root run the container: docker build -t . docker run --env BOTLER_TOKEN= ``` +A sample `docker-compose` looks a little like: +``` +botler: + image: python:3.12 + build: + context: ./gerard-botler + dockerfile: Dockerfile + environment: + - BOTLER_TOKEN=< your token here (MANDATORY!!!!) > +``` # Python stuff