added some docker-compose instructions and a lazy fix to python docker closing the script

This commit is contained in:
james ryan 2024-05-30 16:36:32 -04:00
parent bb36343c63
commit 41c7ec5458
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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 <name> .
docker run --env BOTLER_TOKEN=<token> <name>
```
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