build:为 Docker 部署添加 entrypoint 脚本
- 新增 entrypoint.sh脚本,用于在容器启动时执行初始化操作 - 修改 Dockerfile,使用 entrypoint.sh 作为入口点 - 脚本功能包括: - 创建配置目录 - 复制 bot配置文件 - 复制环境配置文件
This commit is contained in:
@@ -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" ]
|
||||
Reference in New Issue
Block a user