deploy dockerfile

This commit is contained in:
Milka64 2023-12-26 15:32:21 +01:00
parent 30e89ba49c
commit ccde0ff81d
6 changed files with 19 additions and 1 deletions

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM python:3.11
WORKDIR /usr/src/kabot
ENV CONFIG_FILE=/data/config.ini
COPY kabot ./
COPY config.ini.sample /data/config.ini
COPY entrypoint.sh /
RUN pip install --no-cache-dir /usr/src/kabot/
CMD [ "/entrypoint.sh" ]

View file

@ -1,6 +1,6 @@
[DEFAULT] [DEFAULT]
logs = /var/log/kabot/kabot.log logs = /var/log/kabot.log
audio_path = /tmp/ audio_path = /tmp/
voice_channel = channel_name voice_channel = channel_name
text_channel = channel_name text_channel = channel_name

3
entrypoint.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
kabot -c $CONFIG_FILE

View file

@ -3,6 +3,7 @@ include CONTRIBUTING.rst
include HISTORY.rst include HISTORY.rst
include LICENSE include LICENSE
include README.rst include README.rst
include kabot/utils/ressources/*
recursive-include tests * recursive-include tests *
recursive-exclude * __pycache__ recursive-exclude * __pycache__

View file

@ -19,6 +19,8 @@ requirements = [
'python-gitlab', 'python-gitlab',
'giphy_client', 'giphy_client',
'yt-dlp', 'yt-dlp',
'lxml',
'BeautifulSoup4',
] ]
setup_requirements = [ ] setup_requirements = [ ]
@ -51,6 +53,7 @@ setup(
license="BSD license", license="BSD license",
long_description=readme + '\n\n' + history, long_description=readme + '\n\n' + history,
include_package_data=True, include_package_data=True,
package_data={'ressources': ['kabot/utils/ressources/*']},
keywords='kabot', keywords='kabot',
name='kabot', name='kabot',
packages=find_packages(include=['kabot', 'kabot.*']), packages=find_packages(include=['kabot', 'kabot.*']),