Skip to content

Commit

Permalink
Refactor: Dockerfile (#1571)
Browse files Browse the repository at this point in the history
* chore: update base python to 3.9

* feat: add minimal config

* fix: set init config logging level to INFO

Setting logging to INFO so it isn't overwhelming for new users.

* refactor: install errbot from local, not pypi

* docs: add info to CHANGES
sijis authored Jun 10, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2b56971 commit ae06022
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ features:
- docs: add ACL and numerous backends to official documentation (#1552)
- core: add Python 3.10 to automated tests (#1539)
- core: add room acl attribute (#1530)
- chore: refactor Dockerfile errbot install and python version bump (#1571)

fixes:

12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
FROM python:3.8-slim as BUILD
FROM python:3.9-slim as BUILD
WORKDIR /wheel
COPY . .
RUN pip3 wheel --wheel-dir=/wheel \
RUN apt update && apt install build-essential -y
RUN pip3 wheel --wheel-dir=/wheel . \
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram]

FROM python:3.8-slim
FROM python:3.9-slim
COPY --from=BUILD /wheel /wheel
RUN apt update && \
apt install -y git && \
cd /wheel && \
pip3 -vv install --no-cache-dir --no-index --find-links /wheel \
pip3 -vv install --no-cache-dir --no-index --find-links /wheel . \
errbot errbot[irc] errbot[slack] errbot[XMPP] errbot[telegram] && \
rm -rf /wheel /var/lib/apt/lists/*

RUN useradd -m errbot
WORKDIR /home/errbot
USER errbot
RUN errbot --init
EXPOSE 3141 3142
VOLUME /home/errbot
WORKDIR /home/errbot
ENTRYPOINT [ "/usr/local/bin/errbot" ]
2 changes: 1 addition & 1 deletion errbot/templates/initdir/config.py.tmpl
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ BOT_DATA_DIR = r"{{ data_dir }}"
BOT_EXTRA_PLUGIN_DIR = r"{{ extra_plugin_dir }}"

BOT_LOG_FILE = r"{{ log_path }}"
BOT_LOG_LEVEL = logging.DEBUG
BOT_LOG_LEVEL = logging.INFO

BOT_ADMINS = (
"@CHANGE_ME",

0 comments on commit ae06022

Please sign in to comment.