temp: 暂存更新

This commit is contained in:
2024-10-14 00:46:54 +08:00
parent ab6c4340f5
commit c0359c7998
7 changed files with 96 additions and 10 deletions

17
docker/app-init.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# 宿主机挂载路径
TARGET_DIR="/app"
# 检查目录是否为空
if [ -z "$(ls -A $TARGET_DIR)" ]; then
echo "Directory is empty. Copying default content..."
cp -r /default-app/* $TARGET_DIR/
else
echo "Directory is not empty. Skipping copy."
fi
# 启动应用或保持容器运行
# exec "$@"
nginx -g "daemon off;"