mirror of
https://code.lenaisten.de/Lenaisten/lenaverse-bot.git
synced 2024-11-24 16:02:59 +00:00
Dockerfile + LOG_LEVEL
This commit is contained in:
parent
32b098dc76
commit
3c3f97cddc
2 changed files with 18 additions and 1 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal 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" ]
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue