temp: 暂存更新
This commit is contained in:
17
docker/app-init.sh
Normal file
17
docker/app-init.sh
Normal 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;"
|
||||
Reference in New Issue
Block a user