Browse Source

docker-entrypoint.sh update

master
filesite 2 years ago
parent
commit
fdf42193eb
  1. 4
      .gitignore
  2. 4
      Dockerfile
  3. 1
      conf/custom_config_googleimage.json
  4. 1
      conf/custom_config_manual.json
  5. 1
      conf/custom_config_videoblog.json
  6. 1
      conf/custom_config_webdirectory.json
  7. 63
      conf/template_googleimage.php
  8. 65
      conf/template_manual.php
  9. 63
      conf/template_videoblog.php
  10. 57
      conf/template_webdirectory.php
  11. 6
      docker-entrypoint.sh
  12. 7
      docker_build.sh

4
.gitignore vendored

@ -1,2 +1,6 @@
.DS_Store .DS_Store
test/content/ test/content/
runtime/
www/navs/
www/girls/
www/videos/

4
Dockerfile

@ -17,7 +17,3 @@ EXPOSE 80/tcp
ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"] ENTRYPOINT ["/var/www/machete/docker-entrypoint.sh"]
# 默认使用导航站皮肤:manual # 默认使用导航站皮肤:manual
CMD ["manual"] CMD ["manual"]
# build command
# docker build --no-cache -t filesite/machete .

1
conf/custom_config_googleimage.json

@ -0,0 +1 @@
{"theme":"googleimage","content_directory":"girls"}

1
conf/custom_config_manual.json

@ -0,0 +1 @@
{"theme":"manual","content_directory":"content"}

1
conf/custom_config_videoblog.json

@ -0,0 +1 @@
{"theme":"videoblog","content_directory":"videos"}

1
conf/custom_config_webdirectory.json

@ -0,0 +1 @@
{"theme":"webdirectory","content_directory":"navs"}

63
conf/template_googleimage.php

@ -1,63 +0,0 @@
<?php
/**
* Config
*/
$configs = array(
'default_timezone' => 'Asia/Shanghai', //timezone
//图片站皮肤
'content_directory' => 'girls/', //directory of contents in /www/
'theme' => 'googleimage', //name of theme which is enabled
'maxScanDirLevels' => 4, //max directory levels to scan
'default_layout' => 'main', //default layout
'error_layout' => 'error', //exception layout, show error title and content
//for debug, log directory: ../runtime/logs/
'debug' => true,
//图片皮肤配置
'googleimage' => array(
'imageHeight' => 350, //图片高度,单位:px
'contact' => 'FileSite图片网站订制联系:<a href="https://filesite.io" target="_blank">FileSite.io</a>',
),
//目前支持的皮肤
'allowedThemes' => array(
'manual',
'webdirectory',
'googleimage',
'videoblog',
),
//md5加密前缀
'md5Prefix' => 'some_code_here',
//后台管理相关配置
'admin' => array(
'username' => 'filesite',
'password' => '88888888',
'captcha' => true, //后台登陆是否开启验证码
'maxUploadFileSize' => 20, //单位:Mb
'allowedUploadFileTypes' => array(
'image/jpeg',
'image/png',
'image/webp',
'image/gif',
),
),
);
//自定义配置支持
$customConfigFile = __DIR__ . '/../runtime/custom_config.json';
if (file_exists($customConfigFile)) {
try {
$json = file_get_contents($customConfigFile);
$customConfigs = json_decode($json, true);
$configs = array_merge($configs, $customConfigs);
}catch(Exception $e) {}
}
return $configs;

65
conf/template_manual.php

@ -1,65 +0,0 @@
<?php
/**
* Config
*/
$configs = array(
'default_timezone' => 'Asia/Shanghai', //timezone
//文档站皮肤
'content_directory' => 'content/', //directory of contents in /www/
//when it's empty, use layout and views in directory views/
'theme' => 'manual', //name of theme which is enabled
'maxScanDirLevels' => 4, //max directory levels to scan
'default_layout' => 'main', //default layout
'error_layout' => 'error', //exception layout, show error title and content
//for debug, log directory: ../runtime/logs/
'debug' => true,
//视频皮肤配置
'videoblog' => array(
'imageHeight' => 180, //图片高度,单位:px
'contact' => 'FileSite视频网站订制联系:<a href="https://filesite.io" target="_blank">FileSite.io</a>',
),
//目前支持的皮肤
'allowedThemes' => array(
'manual',
'webdirectory',
'googleimage',
'videoblog',
),
//md5加密前缀
'md5Prefix' => 'some_code_here',
//后台管理相关配置
'admin' => array(
'username' => 'filesite',
'password' => '88888888',
'captcha' => true, //后台登陆是否开启验证码
'maxUploadFileSize' => 20, //单位:Mb
'allowedUploadFileTypes' => array(
'image/jpeg',
'image/png',
'image/webp',
'image/gif',
),
),
);
//自定义配置支持
$customConfigFile = __DIR__ . '/../runtime/custom_config.json';
if (file_exists($customConfigFile)) {
try {
$json = file_get_contents($customConfigFile);
$customConfigs = json_decode($json, true);
$configs = array_merge($configs, $customConfigs);
}catch(Exception $e) {}
}
return $configs;

63
conf/template_videoblog.php

@ -1,63 +0,0 @@
<?php
/**
* Config
*/
$configs = array(
'default_timezone' => 'Asia/Shanghai', //timezone
//视频站皮肤
'content_directory' => 'videos/', //directory of contents in /www/
'theme' => 'videoblog', //name of theme which is enabled
'maxScanDirLevels' => 4, //max directory levels to scan
'default_layout' => 'main', //default layout
'error_layout' => 'error', //exception layout, show error title and content
//for debug, log directory: ../runtime/logs/
'debug' => true,
//视频皮肤配置
'videoblog' => array(
'imageHeight' => 180, //图片高度,单位:px
'contact' => 'FileSite视频网站订制联系:<a href="https://filesite.io" target="_blank">FileSite.io</a>',
),
//目前支持的皮肤
'allowedThemes' => array(
'manual',
'webdirectory',
'googleimage',
'videoblog',
),
//md5加密前缀
'md5Prefix' => 'some_code_here',
//后台管理相关配置
'admin' => array(
'username' => 'filesite',
'password' => '88888888',
'captcha' => true, //后台登陆是否开启验证码
'maxUploadFileSize' => 20, //单位:Mb
'allowedUploadFileTypes' => array(
'image/jpeg',
'image/png',
'image/webp',
'image/gif',
),
),
);
//自定义配置支持
$customConfigFile = __DIR__ . '/../runtime/custom_config.json';
if (file_exists($customConfigFile)) {
try {
$json = file_get_contents($customConfigFile);
$customConfigs = json_decode($json, true);
$configs = array_merge($configs, $customConfigs);
}catch(Exception $e) {}
}
return $configs;

57
conf/template_webdirectory.php

@ -1,57 +0,0 @@
<?php
/**
* Config
*/
$configs = array(
'default_timezone' => 'Asia/Shanghai', //timezone
//导航站皮肤
'content_directory' => 'navs/', //directory of contents in /www/
'theme' => 'webdirectory',
'maxScanDirLevels' => 4, //max directory levels to scan
'default_layout' => 'main', //default layout
'error_layout' => 'error', //exception layout, show error title and content
//for debug, log directory: ../runtime/logs/
'debug' => true,
//目前支持的皮肤
'allowedThemes' => array(
'manual',
'webdirectory',
'googleimage',
'videoblog',
),
//md5加密前缀
'md5Prefix' => 'some_code_here',
//后台管理相关配置
'admin' => array(
'username' => 'filesite',
'password' => '88888888',
'captcha' => true, //后台登陆是否开启验证码
'maxUploadFileSize' => 20, //单位:Mb
'allowedUploadFileTypes' => array(
'image/jpeg',
'image/png',
'image/webp',
'image/gif',
),
),
);
//自定义配置支持
$customConfigFile = __DIR__ . '/../runtime/custom_config.json';
if (file_exists($customConfigFile)) {
try {
$json = file_get_contents($customConfigFile);
$customConfigs = json_decode($json, true);
$configs = array_merge($configs, $customConfigs);
}catch(Exception $e) {}
}
return $configs;

6
docker-entrypoint.sh

@ -7,9 +7,9 @@ fi
echo "Theme chosed [${theme}]." echo "Theme chosed [${theme}]."
## 复制对应皮肤的配置文件 ## 复制对应皮肤的配置文件
cd /var/www/machete/conf/ cd /var/www/machete/runtime/
rm -f app.php rm -f custom_config.json
cp "template_${theme}.php" app.php cp "../conf/custom_config_${theme}.json" ./
## 启动nginx和php-fpm ## 启动nginx和php-fpm

7
docker_build.sh

@ -2,4 +2,9 @@
docker stop machete docker stop machete
docker rm machete docker rm machete
docker rmi filesite/machete docker rmi filesite/machete
docker build --no-cache -t filesite/machete .
## build filesite/machete:latest
docker build --no-cache -t filesite/machete -f ./Dockerfile .
## build filesite/machete:samba
docker build --no-cache -t filesite/machete:samba -f ./Dockerfile_samba .
Loading…
Cancel
Save