Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (40 loc) · 1.93 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (40 loc) · 1.93 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
38
39
40
FROM python:3.12-bookworm
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
LANG=zh_CN.UTF-8 \
SHELL=/bin/bash
SHELL ["/bin/bash", "-c"]
WORKDIR /app
RUN echo "deb http://ftp.us.debian.org/debian bookworm main non-free" >> /etc/apt/sources.list.d/fonts.list \
&& apt update \
# clone \
&& apt install git wget curl ffmpeg unzip -y \
&& git clone -b main --recursive https://github.com/PaiGramTeam/PaiGram.git /app \
# install dependencies \
&& pip install virtualenv uv \
&& python3 -m uv venv .venv \
&& . .venv/bin/activate \
&& uv sync --all-extras \
&& playwright install chromium \
&& playwright install-deps chromium \
## set timezone \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
# create cache folder \
&& mkdir cache/ \
# create assets folder \
&& mkdir -p resources/assets \
&& wget -q -O genshin.zip https://r2.miyoushe.de5.net/genshin.zip \
&& unzip genshin.zip -d resources/assets/ \
&& rm genshin.zip \
# clean \
&& apt-get clean -y \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
~/.cache/pip \
~/.cache/uv \
# Add the wait script to the image \
&& wget -O /wait https://github.com/ufoscout/docker-compose-wait/releases/download/2.12.1/wait \
&& chmod +x /wait
ENTRYPOINT /wait && .venv/bin/alembic upgrade head && .venv/bin/python run.py