2328
This commit is contained in:
1 parent
5d0aaea018
commit
92ecf6bba0
6 files changed
+220
-32
No files matched your search
@@ -5,11 +5,19 @@
|
||||
# 创建必要的子目录(以 root 身份)
|
||||
mkdir -p /app/recycle/posts /app/recycle/meta /app/logs /app/backups
|
||||
|
||||
# 修复权限
|
||||
# 修复 recycle 目录权限
|
||||
chown -R nextjs:nodejs /app/recycle /app/logs /app/backups
|
||||
|
||||
# 调试:打印环境变量
|
||||
echo "[entrypoint] BLOG_ROOT=$BLOG_ROOT"
|
||||
# 修复博客目录权限(让 nextjs 用户可写)
|
||||
if [ -d "/blog/content" ]; then
|
||||
chown -R nextjs:nodejs /blog/content
|
||||
fi
|
||||
if [ -d "/blog/static" ]; then
|
||||
chown -R nextjs:nodejs /blog/static
|
||||
fi
|
||||
if [ -f "/blog/hugo.toml" ]; then
|
||||
chown nextjs:nodejs /blog/hugo.toml
|
||||
fi
|
||||
|
||||
# 以 nextjs 用户启动应用(保留环境变量)
|
||||
exec su-exec nextjs env "$@"
|
||||
# 以 nextjs 用户启动应用
|
||||
exec su-exec nextjs "$@"
|
||||
Reference in new issue
Block a user