优化启动docker启动问题

This commit is contained in:
Connor
2026-01-12 22:57:14 +08:00
parent f5ca6e9bdd
commit 1c682a8512
2 changed files with 9 additions and 6 deletions

View File

@@ -83,13 +83,12 @@ RUN cp ./configs/config.example.yaml ./configs/config.yaml
# 复制数据库迁移文件
COPY migrations ./migrations/
# 创建数据目录
RUN mkdir -p /app/data/storage && \
chown -R app:app /app
# 切换到非 root 用户
USER app
# 创建数据目录(在 app 用户下创建,确保权限正确)
RUN mkdir -p /app/data/storage
# 暴露端口
EXPOSE 5678