Skip to content

Commit fb1bf14

Browse files
committed
Add Docker support with Dockerfile and docker-compose.yml
1 parent fe7705d commit fb1bf14

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM python:3.11-slim
2+
3+
RUN apt-get update -y \
4+
&& apt-get install -y --no-install-recommends \
5+
build-essential \
6+
postgresql-client \
7+
netcat-openbsd \
8+
&& apt-get clean \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
RUN pip install --upgrade pip
12+
13+
WORKDIR /app
14+
15+
COPY requirements.txt .
16+
RUN pip install --no-cache-dir -r requirements.txt
17+
18+
COPY . .
19+
20+
RUN mkdir -p plans fonts
21+
22+
CMD ["python", "bot.py"]

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
3+
services:
4+
bot:
5+
build: .
6+
volumes:
7+
- ./db.json:/app/db.json
8+
- ./plans:/app/plans
9+
env_file:
10+
- .env
11+
restart: always

0 commit comments

Comments
 (0)