-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
45 lines (40 loc) · 1.09 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
FROM ubuntu:latest
LABEL MAINTAINER="qcgzxw<[email protected]>"
ARG DEBIAN_FRONTEND=noninteractive
# Set Environment Variables
## App Mode
ENV APP_MODE dev
ENV MAX_SEND_LIMIT 10
ENV FORMAT epub
## Database Infomation
ENV DB sqlite
ENV DB_NAME ebook_sender_bot
ENV DB_HOST localhost
ENV DB_PORT 3306
ENV DB_USER root
ENV DB_PASSWORD root
## Smtp Infomation
ENV SMTP_HOST ''
ENV SMTP_PORT ''
ENV SMTP_USERNAME ''
ENV SMTP_PASSWORD ''
## Telegram infomation
ENV BOT_TOKEN ''
ENV DEVELOPER_CHAT_ID ''
# Install Calibere And Python
RUN \
apt-get update && \
apt-get install -y curl pkg-config tzdata wget iputils-ping git libfontconfig libgl1-mesa-glx python3 python3-pip python3-pyqt5.qtmultimedia libnss3 libopengl0 && \
pip3 install PyQtWebEngine && \
wget --no-check-certificate -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin
# Setup App
WORKDIR /app
VOLUME /app
COPY . .
RUN \
chmod +x docker/setup.sh && \
python3 -m pip install --upgrade pip && \
pip3 install -r requirements.txt && \
touch default.log
# Run App
CMD ["/bin/bash", "/app/docker/setup.sh"]