Skip to content

Commit 1f11f0c

Browse files
committed
feat: dockerized the bot
1 parent 8e01f1b commit 1f11f0c

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Use an official Python runtime as a parent image
2+
FROM python:3.10-slim
3+
4+
# Set the working directory in the container
5+
WORKDIR /app
6+
7+
# Copy the requirements file into the container at /app
8+
COPY requirements.txt .
9+
10+
# Install any needed packages specified in requirements.txt
11+
RUN pip install --no-cache-dir -r requirements.txt
12+
13+
# Copy the rest of the application code into the container at /app
14+
COPY . .
15+
16+
# Run bot.py when the container launches
17+
CMD ["python", "bot.py"]

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
services:
2+
bot:
3+
build: .
4+
restart: always

0 commit comments

Comments
 (0)