diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f574ded --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.10.8 + +WORKDIR /usr/src/app + +RUN apt-get update && \ + apt-get install -y git && \ + rm -rf /var/lib/apt/lists/* + +COPY . . + +RUN pip install --no-cache-dir -r requirements.txt + +EXPOSE 8000 + +CMD ["python", "bot/bot.py"] diff --git a/bot/config.py b/bot/config.py index 22da5b7..8d00ed9 100644 --- a/bot/config.py +++ b/bot/config.py @@ -8,7 +8,7 @@ class Settings(BaseSettings): docker_enabled = os.getenv("DOCKER_ENABLED", False) - port = int(os.getenv("PORT", 8000)) + port = int(os.getenv("PORT", 8080)) bot_prefix: str = os.getenv("BOT_PREFIX") bot_token: str = os.getenv("BOT_TOKEN") application_id: str = os.getenv("APPLICATION_ID") diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f398967 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.8' + +services: + bot: + build: . + ports: + - "8080:8080" + env_file: + - .env