01030924
This commit is contained in:
parent
6f39331b70
commit
eb287f35fb
18
Dockerfile
18
Dockerfile
|
@ -100,5 +100,19 @@ RUN apk add --no-cache gettext
|
||||||
# 暴露 80 端口
|
# 暴露 80 端口
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# 可选:复制自定义的 nginx 配置
|
FROM tusproject/tusd as tusd
|
||||||
# COPY nginx.conf /etc/nginx/nginx.conf
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# 创建一个包装脚本
|
||||||
|
COPY <<EOF /docker-entrypoint.sh
|
||||||
|
#!/bin/sh
|
||||||
|
umask 000
|
||||||
|
exec "\$@"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
RUN chmod +x /docker-entrypoint.sh
|
||||||
|
|
||||||
|
# 设置入口点
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
CMD ["tusd"]
|
|
@ -46,6 +46,8 @@ export class UploadService {
|
||||||
|
|
||||||
const uniqueId = nanoid(6);
|
const uniqueId = nanoid(6);
|
||||||
const fileId = `${timestamp}_${cleanName}_${uniqueId}`;
|
const fileId = `${timestamp}_${cleanName}_${uniqueId}`;
|
||||||
|
fs.mkdirSync(path.join(process.env.UPLOAD_DIR, fileId), { recursive: true, mode: 0o755 })
|
||||||
|
// fs.chownSync(path.join(process.env.UPLOAD_DIR, fileId), 100999, 100999);
|
||||||
// await fs.promises.mkdir(path.join(process.env.UPLOAD_DIR, fileId), { recursive: true });
|
// await fs.promises.mkdir(path.join(process.env.UPLOAD_DIR, fileId), { recursive: true });
|
||||||
hookResponse.ChangeFileInfo = {
|
hookResponse.ChangeFileInfo = {
|
||||||
ID: `${fileId}/${fileId}${extension}`,
|
ID: `${fileId}/${fileId}${extension}`,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
VITE_APP_VERSION: "$VITE_APP_VERSION",
|
VITE_APP_VERSION: "$VITE_APP_VERSION",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<title>烽火mooc</title>
|
<title>fhmooc</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -28,7 +28,7 @@ export function TopNavBar({
|
||||||
<Bars3Icon className='w-5 h-5' />
|
<Bars3Icon className='w-5 h-5' />
|
||||||
</button>
|
</button>
|
||||||
<h1 className="text-xl font-semibold text-slate-800 tracking-wide">
|
<h1 className="text-xl font-semibold text-slate-800 tracking-wide">
|
||||||
烽火mooc
|
fhmooc
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ services:
|
||||||
# environment:
|
# environment:
|
||||||
# - VITE_APP_SERVER_IP=192.168.79.77
|
# - VITE_APP_SERVER_IP=192.168.79.77
|
||||||
# - VITE_APP_VERSION=0.3.0
|
# - VITE_APP_VERSION=0.3.0
|
||||||
# - VITE_APP_APP_NAME=烽火慕课
|
# - VITE_APP_APP_NAME=fh慕课
|
||||||
# server:
|
# server:
|
||||||
# image: td-server:latest
|
# image: td-server:latest
|
||||||
# ports:
|
# ports:
|
||||||
|
|
Loading…
Reference in New Issue