Merge pull request #2409 from iu2frl/dev

Fixing Docker permissions
这个提交包含在:
Peter Goodhall 2023-08-15 21:43:26 +01:00 提交者 GitHub
当前提交 b7608848ad
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 4 个文件被更改,包括 21 次插入24 次删除

查看文件

@ -13,18 +13,11 @@ RUN docker-php-ext-install mysqli mbstring xml
RUN rm -rf /var/www/html/docker/
COPY ./ /var/www/html/
WORKDIR /var/www/html
# Setting permissions as: https://github.com/magicbug/Cloudlog/wiki/Installation
RUN cd /var/www/html \
&& echo "Setting root as owner of the folder..." \
&& chown -R root:root /var/www/html \
&& echo "Setting permissions to the install folder" \
&& chown -R root:www-data ./application/config/ \
&& chown -R root:www-data ./application/logs/ \
&& chown -R root:www-data ./assets/qslcard/ \
&& chown -R root:www-data ./backup/ \
&& chown -R root:www-data ./updates/ \
&& chown -R root:www-data ./uploads/ \
&& chown -R root:www-data ./images/eqsl_card_images/ \
&& chown -R root:www-data ./assets/json/ \
&& echo "Setting root as owner of the html folder" \
&& chown -R root:www-data /var/www/html
RUN echo "Setting permissions to the install folder" \
&& chmod -R g+rw ./application/config/ \
&& chmod -R g+rw ./application/logs/ \
&& chmod -R g+rw ./assets/qslcard/ \
@ -33,6 +26,4 @@ RUN cd /var/www/html \
&& chmod -R g+rw ./uploads/ \
&& chmod -R g+rw ./images/eqsl_card_images/ \
&& chmod -R g+rw ./assets/json/ \
&& chmod 777 /var/www/html/install \
&& echo "Make sure everything is fine" \
&& dir -ls
&& chmod -R 777 /var/www/html/install

查看文件

@ -123,5 +123,4 @@ class Core {
}
}
?>
?>

查看文件

@ -43,5 +43,4 @@ class Database {
return true;
}
}
?>
?>

查看文件

@ -7,13 +7,21 @@ $db_file_path = $db_config_path."database.php";
function delDir($dir) {
$files = glob( $dir . '*', GLOB_MARK );
foreach( $files as $file ){
if( substr( $file, -1 ) == '/' )
delDir( $file );
else
unlink( $file );
foreach ( $files as $file ) {
if ( substr( $file, -1 ) == '/' ) {
if (file_exists($file)) {
delDir( $file );
}
} else {
if (file_exists($file)) {
unlink( $file );
}
}
}
rmdir( $dir );
// This step may be not needed
if (file_exists($dir)) {
rmdir( $dir );
}
}
if (file_exists($db_file_path)) {