Skip to content

Commit

Permalink
add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
alexraskin committed Apr 9, 2024
1 parent abe6ff8 commit 58836b5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
2 changes: 1 addition & 1 deletion bot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3.8'

services:
bot:
build: .
ports:
- "8080:8080"
env_file:
- .env

0 comments on commit 58836b5

Please sign in to comment.