This commit is contained in:
zhinianboke 2025-08-22 13:27:38 +08:00
parent 62f38afce0
commit 4c860980fb
2 changed files with 9 additions and 11 deletions

View File

@ -101,9 +101,10 @@ EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# 复制启动脚本
# 复制启动脚本并设置权限
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh && \
dos2unix /app/entrypoint.sh 2>/dev/null || true
# 启动命令
CMD ["/app/entrypoint.sh"]
# 启动命令使用ENTRYPOINT确保脚本被执行
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]

View File

@ -1,15 +1,12 @@
#!/bin/bash
set -e
echo "🚀 启动闲鱼自动回复系统..."
echo "📊 数据库将在应用启动时自动初始化..."
echo "🎯 启动主应用..."
echo "Starting xianyu-auto-reply system..."
# 确保数据目录存在
# Create necessary directories
mkdir -p /app/data /app/logs /app/backups /app/static/uploads/images
# 设置目录权限
# Set permissions
chmod 777 /app/data /app/logs /app/backups /app/static/uploads /app/static/uploads/images
# 启动主应用
# Start the application
exec python Start.py