Add Docker one-click deploy and data migration docs.
Enable PHP 8.2 + Apache compose stack with persistent data/uploads volumes and PhpSpreadsheet for xlsx import/export. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/public
|
||||
|
||||
<Directory /var/www/html/public>
|
||||
Options -Indexes +FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
</Directory>
|
||||
|
||||
# 禁止直接访问业务数据与源码目录
|
||||
<DirectoryMatch "^/var/www/html/(app|data|uploads|vendor)">
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /var/www/html/data /var/www/html/uploads
|
||||
|
||||
# 挂载卷后修正写权限,避免 SQLite / 上传失败
|
||||
chown -R www-data:www-data /var/www/html/data /var/www/html/uploads
|
||||
chmod -R 775 /var/www/html/data /var/www/html/uploads
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user