-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (30 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
37 lines (30 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Use official Python slim image for smaller size
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
gnupg \
unzip \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Google Chrome
RUN wget -q -O /tmp/google-chrome-key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub \
&& mkdir -p /etc/apt/keyrings \
&& mv /tmp/google-chrome-key.asc /etc/apt/keyrings/google-chrome.asc \
&& echo "deb [signed-by=/etc/apt/keyrings/google-chrome.asc] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV BOT_TOKEN=$BOT_TOKEN
ENV WEBHOOK_URL=https://uiu-student-bot.onrender.com/webhook
ENV PORT=8443
# Command to run the bot
CMD ["python", "app.py"]