forked from MistEO/Pallas-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
128 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ENVIRONMENT=dev | ||
ENVIRONMENT=prod | ||
APSCHEDULER_AUTOSTART=true | ||
APSCHEDULER_CONFIG={"apscheduler.timezone": "Asia/Shanghai"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
HOST=127.0.0.1 | ||
PORT=8080 | ||
DEBUG=true | ||
COMMAND_START=["/", ""] | ||
LOG_LEVEL=DEBUG | ||
FASTAPI_RELOAD=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
HOST=127.0.0.1 | ||
HOST=0.0.0.0 | ||
PORT=8080 | ||
SECRET= | ||
ACCESS_TOKEN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
FROM namiya233/go-cqhttp | ||
FROM python:3.9 as requirements-stage | ||
|
||
FROM python:3.8 | ||
WORKDIR /tmp | ||
|
||
COPY ./pyproject.toml ./poetry.lock* /tmp/ | ||
|
||
RUN curl -sSL https://install.python-poetry.org -o install-poetry.py | ||
|
||
RUN python install-poetry.py --yes | ||
|
||
ENV PATH="${PATH}:/root/.local/bin" | ||
|
||
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes | ||
|
||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9 | ||
|
||
COPY / /app/ | ||
RUN pip install --no-cache-dir -r /app/requirements.txt | ||
WORKDIR /app | ||
CMD ["python","bot.py"] | ||
|
||
COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt | ||
|
||
RUN pip install --no-cache-dir --upgrade -r requirements.txt | ||
|
||
RUN rm requirements.txt | ||
|
||
COPY ./ /app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
version: "2" | ||
version: "3" | ||
services: | ||
# 其他配置参考 https://hub.docker.com/r/tiangolo/uvicorn-gunicorn-fastapi/ | ||
nonebot: | ||
build: bot | ||
volumes: | ||
- "/etc/localtime:/etc/localtime" | ||
- "./:/app/" | ||
build: . | ||
container_name: nonebot | ||
ports: | ||
- "8080:8080" # 映射端口到宿主机 宿主机端口:容器端口 | ||
env_file: | ||
- ".env.prod" # fastapi 使用的环境变量文件 | ||
environment: | ||
- ENVIRONMENT=prod # 配置 nonebot 运行环境,此项会被 .env 文件覆盖 | ||
- APP_MODULE=bot:app # 配置 asgi 入口 | ||
- SECRET # 通过 SECRET=xxx nb up -d 传递密钥 | ||
- ACCESS_TOKEN # 通过 ACCESS_TOKEN=xxx nb up -d 传递密钥 | ||
- MAX_WORKERS=1 # 如果你有多个QQ,且存在 self_id 指定,多个 worker 会导致无法找到其他 websocket 连接 | ||
network_mode: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
bot/plugins/backup/drift/__init__.py → src/plugins/backup/drift/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.