mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-05 11:26:43 +08:00
update Dockerfile, docker-compose, fix #95
This commit is contained in:
parent
319e7401ed
commit
49909e9750
@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
go-cqhttp:
|
||||
image: felinae98/go-cqhttp:v1.0.0-beta8-fix2
|
||||
image: silicer/go-cqhttp:v1.0.0-rc3
|
||||
volumes:
|
||||
- ./bot-data:/data
|
||||
nonebot:
|
||||
@ -15,10 +15,9 @@ services:
|
||||
# SUPERUSERS: '[<your QQ>]'
|
||||
BISON_CONFIG_PATH: /data
|
||||
# BISON_OUTER_URL: 'http://<your server ip>:8080/bison'
|
||||
BISON_FILTER_LOG: true
|
||||
BISON_USE_PIC: false # 如果需要将文字转为图片发送请改为true
|
||||
|
||||
expose:
|
||||
BISON_FILTER_LOG: 'true'
|
||||
BISON_USE_PIC: 'false' # 如果需要将文字转为图片发送请改为true
|
||||
ports:
|
||||
- 8080:8080
|
||||
depends_on:
|
||||
- go-cqhttp
|
||||
|
@ -1,17 +1,22 @@
|
||||
FROM python:3.9
|
||||
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
|
||||
# syntax=docker/dockerfile:1.2
|
||||
FROM python:3.9 as base
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y xvfb fonts-noto-color-emoji ttf-unifont \
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
python3 -m pip install poetry && poetry config virtualenvs.create false
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
--mount=type=cache,target=/var/lib/apt \
|
||||
apt-get update && apt-get install -y xvfb fonts-noto-color-emoji ttf-unifont \
|
||||
libfontconfig1 libfreetype6 xfonts-cyrillic xfonts-scalable fonts-liberation \
|
||||
fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf \
|
||||
fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 \
|
||||
libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 \
|
||||
libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
|
||||
libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1
|
||||
COPY ./pyproject.toml ./poetry.lock* /app/
|
||||
RUN poetry install --no-dev --no-root
|
||||
RUN playwright install chromium
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
||||
poetry install --no-dev --no-root
|
||||
RUN --mount=type=cache,target=/root/.cache/ms-playwright \
|
||||
playwright install chromium
|
||||
ADD src /app/src
|
||||
ADD bot.py /app/
|
||||
ENV HOST=0.0.0.0
|
||||
|
@ -1,19 +1,25 @@
|
||||
FROM python:3.9
|
||||
RUN python3 -m pip install poetry && poetry config virtualenvs.create false
|
||||
# syntax=docker/dockerfile:1.2
|
||||
FROM python:3.9 as base
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y xvfb fonts-noto-color-emoji ttf-unifont \
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
python3 -m pip install poetry && poetry config virtualenvs.create false
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
--mount=type=cache,target=/var/lib/apt \
|
||||
apt-get update && apt-get install -y xvfb fonts-noto-color-emoji ttf-unifont \
|
||||
libfontconfig1 libfreetype6 xfonts-cyrillic xfonts-scalable fonts-liberation \
|
||||
fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf \
|
||||
fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf \
|
||||
fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 \
|
||||
libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 \
|
||||
libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
|
||||
libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1
|
||||
COPY ./pyproject.toml ./poetry.lock* ./bot.py /app/
|
||||
RUN poetry add nonebot-plugin-sentry && \
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
||||
poetry add nonebot-plugin-sentry && \
|
||||
sed '/nonebot.load_builtin_plugins("echo")/a nonebot.load_plugin("nonebot_plugin_sentry")' -i bot.py
|
||||
RUN poetry install --no-dev --no-root
|
||||
RUN playwright install chromium
|
||||
RUN --mount=type=cache,target=/root/.cache/pypoetry \
|
||||
poetry install --no-dev --no-root
|
||||
RUN --mount=type=cache,target=/root/.cache/ms-playwright \
|
||||
playwright install chromium
|
||||
ADD src /app/src
|
||||
ENV HOST=0.0.0.0
|
||||
CMD ["python", "bot.py"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user