build:为 Docker 部署添加 entrypoint 脚本

- 新增 entrypoint.sh脚本,用于在容器启动时执行初始化操作
- 修改 Dockerfile,使用 entrypoint.sh 作为入口点
- 脚本功能包括:
  - 创建配置目录
  - 复制 bot配置文件
  - 复制环境配置文件
This commit is contained in:
infinitycat
2025-04-02 15:24:12 +08:00
parent 4197ce5906
commit 1934aa30f2
2 changed files with 60 additions and 1 deletions

View File

@@ -17,4 +17,8 @@ RUN pip install --upgrade -r requirements.txt
COPY . .
EXPOSE 8000
ENTRYPOINT [ "python","bot.py" ]
RUN chmod +x /MaiMBot/entrypoint.sh
ENTRYPOINT ["/MaiMBot/entrypoint.sh"]
CMD [ "python","bot.py" ]