Dockerfile + LOG_LEVEL

This commit is contained in:
Jörn-Michael Miehe 2023-11-25 01:02:55 +01:00
parent 32b098dc76
commit 3c3f97cddc
2 changed files with 18 additions and 1 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM python:3.11-slim
# env setup
WORKDIR /usr/local/src/lenaverse_bot
# install lenaverse_bot
COPY . ./
RUN set -ex; \
# remove example app
rm -rf /app; \
\
python -m pip --no-cache-dir install ./
# run as unprivileged user
USER nobody
CMD [ "lenaverse-bot" ]

View file

@ -6,4 +6,4 @@ import discord
discord.utils.setup_logging() discord.utils.setup_logging()
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
_logger.setLevel(os.getenv("LOG_LEVEL", logging.WARN)) _logger.setLevel(os.getenv("LOG_LEVEL", logging.INFO))