diff --git a/apps/mediawiki/1.42.3/.env.sample b/apps/mediawiki/1.42.3/.env.sample new file mode 100644 index 00000000..044ada88 --- /dev/null +++ b/apps/mediawiki/1.42.3/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="mediawiki" +INTERNAL_DATA_PATH="/var/www/data" +LOCAL_SETTINGS_PATH="./data/LocalSettings.php" +MEDIAWIKI_DATA_PATH="./data/data" +MEDIAWIKI_IMAGES_PATH="./data/images" +PANEL_APP_PORT_HTTP=40315 diff --git a/apps/mediawiki/1.42.3/data.yml b/apps/mediawiki/1.42.3/data.yml new file mode 100644 index 00000000..3cffd2a1 --- /dev/null +++ b/apps/mediawiki/1.42.3/data.yml @@ -0,0 +1,38 @@ +additionalProperties: + formFields: + - default: "40315" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "./data/images" + disabled: true + envKey: MEDIAWIKI_IMAGES_PATH + labelEn: MediaWiki Images Path + labelZh: MediaWiki 图片路径 + required: true + type: text + - default: "./data/data" + disabled: true + envKey: MEDIAWIKI_DATA_PATH + labelEn: MediaWiki Data Path + labelZh: MediaWiki 数据路径 + required: true + type: text + - default: "/var/www/data" + edit: true + envKey: INTERNAL_DATA_PATH + labelEn: Internal container data paths + labelZh: 容器内部数据路径 + required: true + type: text + - default: "./data/LocalSettings.php" + disabled: true + envKey: LOCAL_SETTINGS_PATH + labelEn: LocalSettings.php Path ([necessary] Edit compose.yml to close the mapping to regenerate the configuration file) + labelZh: LocalSettings.php 路径 (【必要】编辑 compose.yml 关闭映射可重新生成配置文件) + required: true + type: text diff --git a/apps/mediawiki/1.42.3/data/LocalSettings.php b/apps/mediawiki/1.42.3/data/LocalSettings.php new file mode 100644 index 00000000..685813a0 --- /dev/null +++ b/apps/mediawiki/1.42.3/data/LocalSettings.php @@ -0,0 +1,172 @@ + "$wgResourceBasePath/resources/assets/change-your-logo.svg", + 'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg", +]; + +## UPO means: this is also a user preference option + +$wgEnableEmail = false; +$wgEnableUserEmail = true; # UPO + +$wgEmergencyContact = ''; +$wgPasswordSender = ''; + +$wgEnotifUserTalk = false; # UPO +$wgEnotifWatchlist = false; # UPO +$wgEmailAuthentication = true; + +## Database settings +$wgDBtype = 'sqlite'; +$wgDBserver = ''; +$wgDBname = 'my_wiki'; +$wgDBuser = ''; +$wgDBpassword = ''; + +# SQLite-specific settings +$wgSQLiteDataDir = "/var/www/data"; +$wgObjectCaches[CACHE_DB] = [ + 'class' => SqlBagOStuff::class, + 'loggroup' => 'SQLBagOStuff', + 'server' => [ + 'type' => 'sqlite', + 'dbname' => 'wikicache', + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 + ] +]; +$wgLocalisationCacheConf['storeServer'] = [ + 'type' => 'sqlite', + 'dbname' => "{$wgDBname}_l10n_cache", + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 +]; +$wgJobTypeConf['default'] = [ + 'class' => 'JobQueueDB', + 'claimTTL' => 3600, + 'server' => [ + 'type' => 'sqlite', + 'dbname' => "{$wgDBname}_jobqueue", + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 + ] +]; +$wgResourceLoaderUseObjectCacheForDeps = true; + +# Shared database table +# This has no effect unless $wgSharedDB is also set. +$wgSharedTables[] = "actor"; + +## Shared memory settings +$wgMainCacheType = CACHE_ACCEL; +$wgMemCachedServers = []; + +## To enable image uploads, make sure the 'images' directory +## is writable, then set this to true: +$wgEnableUploads = false; +$wgUseImageMagick = true; +$wgImageMagickConvertCommand = '/usr/bin/convert'; + +# InstantCommons allows wiki to use images from https://commons.wikimedia.org +$wgUseInstantCommons = false; + +# Periodically send a pingback to https://www.mediawiki.org/ with basic data +# about this MediaWiki instance. The Wikimedia Foundation shares this data +# with MediaWiki developers to help guide future development efforts. +$wgPingback = false; + +# Site language code, should be one of the list in ./includes/languages/data/Names.php +$wgLanguageCode = 'zh-cn'; + +# Time zone +$wgLocaltimezone = 'UTC'; + +## Set $wgCacheDirectory to a writable directory on the web server +## to make your wiki go slightly faster. The directory should not +## be publicly accessible from the web. +#$wgCacheDirectory = "$IP/cache"; + +$wgSecretKey = '45717985f5d8fff577d2d27da22b37bd1541ad6047585f44bdc14fb9e53568da'; + +# Changing this will log out all existing sessions. +$wgAuthenticationTokenVersion = '1'; + +# Site upgrade key. Must be set to a string (default provided) to turn on the +# web installer while LocalSettings.php is in place +$wgUpgradeKey = 'f05f42e60810b946'; + +## For attaching licensing metadata to pages, and displaying an +## appropriate copyright notice / icon. GNU Free Documentation +## License and Creative Commons licenses are supported so far. +$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright +$wgRightsUrl = ''; +$wgRightsText = ''; +$wgRightsIcon = ""; + +# Path to the GNU diff3 utility. Used for conflict resolution. +$wgDiff3 = '/usr/bin/diff3'; + +## Default skin: you can change the default skin. Use the internal symbolic +## names, e.g. 'vector' or 'monobook': +$wgDefaultSkin = 'vector'; + +# Enabled skins. +# The following skins were automatically enabled: +wfLoadSkin( 'MinervaNeue' ); +wfLoadSkin( 'MonoBook' ); +wfLoadSkin( 'Timeless' ); +wfLoadSkin( 'Vector' ); + + +# End of automatically generated settings. +# Add more configuration options below. + diff --git a/apps/mediawiki/1.42.3/data/data/.gitkeep b/apps/mediawiki/1.42.3/data/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/mediawiki/1.42.3/data/images/.gitkeep b/apps/mediawiki/1.42.3/data/images/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/mediawiki/1.42.3/docker-compose.yml b/apps/mediawiki/1.42.3/docker-compose.yml new file mode 100644 index 00000000..a530d031 --- /dev/null +++ b/apps/mediawiki/1.42.3/docker-compose.yml @@ -0,0 +1,20 @@ +services: + mediawiki: + image: "mediawiki:1.42.3" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:80" + volumes: + - ${MEDIAWIKI_IMAGES_PATH}:/var/www/html/images + - ${MEDIAWIKI_DATA_PATH}:${INTERNAL_DATA_PATH} + # 以下行前添加#号表示关闭映射,可进行初始化配置生成 + - ${LOCAL_SETTINGS_PATH}:/var/www/html/LocalSettings.php + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mediawiki/1.42.3/scripts/init.sh b/apps/mediawiki/1.42.3/scripts/init.sh new file mode 100644 index 00000000..e6226d6f --- /dev/null +++ b/apps/mediawiki/1.42.3/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R www-data:www-data data \ No newline at end of file diff --git a/apps/mediawiki/README.md b/apps/mediawiki/README.md new file mode 100644 index 00000000..df57b9ee --- /dev/null +++ b/apps/mediawiki/README.md @@ -0,0 +1,25 @@ +# MediaWiki + +**MediaWiki** 是一个免费、开源的 Wiki 软件包,由 PHP 编写。它是 Wikipedia 及其他 Wikimedia 项目的基础平台,每月有数亿人使用。MediaWiki 支持超过 350 种语言,凭借其可靠性和强大的功能集,拥有庞大而活跃的第三方用户和开发者社区。 + +## 使用说明 + +- 1. 数据库连接信息及更多的设置通过`LocalSettings.php`文件进行设置, + +- 2. 通过取消`LocalSettings.php`文件的映射来重新初始化,并获取配置文件。**【必要】** + +- 3. 然后修改并重新映射`LocalSettings.php`文件到容器内来使新设置生效。 + +- 4. 需要将配置文件正确放置,文件路径大概如下:`/opt/1panel/apps/local/mediawiki/mediawiki/data/LocalSettings.php`,按需修改。 + +- 5. **具体:安装应用/修改应用参数时,点击`高级设置`>`编辑 compose 文件`,通过修改对`LocalSettings.php`文件的映射与否,获取新配置文件/启用配置文件。** + +- 6. 在`高级设置`>`编辑 compose 文件`时,可通过按需修改编排的以下部分,然后确认重建应用生效,此步骤即是修改配置文件的映射。 + +``` + volumes: + - ${MEDIAWIKI_IMAGES_PATH}:/var/www/html/images + - ${MEDIAWIKI_DATA_PATH}:${INTERNAL_DATA_PATH} + # 删除以下行前的#号表示启用 + #- ${LOCAL_SETTINGS_PATH}:/var/www/html/LocalSettings.php # 映射到容器内的配置文件 +``` \ No newline at end of file diff --git a/apps/mediawiki/data.yml b/apps/mediawiki/data.yml new file mode 100644 index 00000000..648ac2e0 --- /dev/null +++ b/apps/mediawiki/data.yml @@ -0,0 +1,19 @@ +name: MediaWiki +tags: + - 建站 +title: 开源百科引擎 +description: 开源百科引擎 +additionalProperties: + key: mediawiki + name: MediaWiki + tags: + - WebSite + shortDescZh: 开源百科引擎 + shortDescEn: Open-source wiki engine + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://www.mediawiki.org + github: https://github.com/wikimedia/mediawiki + document: https://www.mediawiki.org/wiki/Manual:Installation_guide diff --git a/apps/mediawiki/latest/.env.sample b/apps/mediawiki/latest/.env.sample new file mode 100644 index 00000000..044ada88 --- /dev/null +++ b/apps/mediawiki/latest/.env.sample @@ -0,0 +1,6 @@ +CONTAINER_NAME="mediawiki" +INTERNAL_DATA_PATH="/var/www/data" +LOCAL_SETTINGS_PATH="./data/LocalSettings.php" +MEDIAWIKI_DATA_PATH="./data/data" +MEDIAWIKI_IMAGES_PATH="./data/images" +PANEL_APP_PORT_HTTP=40315 diff --git a/apps/mediawiki/latest/data.yml b/apps/mediawiki/latest/data.yml new file mode 100644 index 00000000..3cffd2a1 --- /dev/null +++ b/apps/mediawiki/latest/data.yml @@ -0,0 +1,38 @@ +additionalProperties: + formFields: + - default: "40315" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "./data/images" + disabled: true + envKey: MEDIAWIKI_IMAGES_PATH + labelEn: MediaWiki Images Path + labelZh: MediaWiki 图片路径 + required: true + type: text + - default: "./data/data" + disabled: true + envKey: MEDIAWIKI_DATA_PATH + labelEn: MediaWiki Data Path + labelZh: MediaWiki 数据路径 + required: true + type: text + - default: "/var/www/data" + edit: true + envKey: INTERNAL_DATA_PATH + labelEn: Internal container data paths + labelZh: 容器内部数据路径 + required: true + type: text + - default: "./data/LocalSettings.php" + disabled: true + envKey: LOCAL_SETTINGS_PATH + labelEn: LocalSettings.php Path ([necessary] Edit compose.yml to close the mapping to regenerate the configuration file) + labelZh: LocalSettings.php 路径 (【必要】编辑 compose.yml 关闭映射可重新生成配置文件) + required: true + type: text diff --git a/apps/mediawiki/latest/data/LocalSettings.php b/apps/mediawiki/latest/data/LocalSettings.php new file mode 100644 index 00000000..685813a0 --- /dev/null +++ b/apps/mediawiki/latest/data/LocalSettings.php @@ -0,0 +1,172 @@ + "$wgResourceBasePath/resources/assets/change-your-logo.svg", + 'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg", +]; + +## UPO means: this is also a user preference option + +$wgEnableEmail = false; +$wgEnableUserEmail = true; # UPO + +$wgEmergencyContact = ''; +$wgPasswordSender = ''; + +$wgEnotifUserTalk = false; # UPO +$wgEnotifWatchlist = false; # UPO +$wgEmailAuthentication = true; + +## Database settings +$wgDBtype = 'sqlite'; +$wgDBserver = ''; +$wgDBname = 'my_wiki'; +$wgDBuser = ''; +$wgDBpassword = ''; + +# SQLite-specific settings +$wgSQLiteDataDir = "/var/www/data"; +$wgObjectCaches[CACHE_DB] = [ + 'class' => SqlBagOStuff::class, + 'loggroup' => 'SQLBagOStuff', + 'server' => [ + 'type' => 'sqlite', + 'dbname' => 'wikicache', + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 + ] +]; +$wgLocalisationCacheConf['storeServer'] = [ + 'type' => 'sqlite', + 'dbname' => "{$wgDBname}_l10n_cache", + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 +]; +$wgJobTypeConf['default'] = [ + 'class' => 'JobQueueDB', + 'claimTTL' => 3600, + 'server' => [ + 'type' => 'sqlite', + 'dbname' => "{$wgDBname}_jobqueue", + 'tablePrefix' => '', + 'variables' => [ 'synchronous' => 'NORMAL' ], + 'dbDirectory' => $wgSQLiteDataDir, + 'trxMode' => 'IMMEDIATE', + 'flags' => 0 + ] +]; +$wgResourceLoaderUseObjectCacheForDeps = true; + +# Shared database table +# This has no effect unless $wgSharedDB is also set. +$wgSharedTables[] = "actor"; + +## Shared memory settings +$wgMainCacheType = CACHE_ACCEL; +$wgMemCachedServers = []; + +## To enable image uploads, make sure the 'images' directory +## is writable, then set this to true: +$wgEnableUploads = false; +$wgUseImageMagick = true; +$wgImageMagickConvertCommand = '/usr/bin/convert'; + +# InstantCommons allows wiki to use images from https://commons.wikimedia.org +$wgUseInstantCommons = false; + +# Periodically send a pingback to https://www.mediawiki.org/ with basic data +# about this MediaWiki instance. The Wikimedia Foundation shares this data +# with MediaWiki developers to help guide future development efforts. +$wgPingback = false; + +# Site language code, should be one of the list in ./includes/languages/data/Names.php +$wgLanguageCode = 'zh-cn'; + +# Time zone +$wgLocaltimezone = 'UTC'; + +## Set $wgCacheDirectory to a writable directory on the web server +## to make your wiki go slightly faster. The directory should not +## be publicly accessible from the web. +#$wgCacheDirectory = "$IP/cache"; + +$wgSecretKey = '45717985f5d8fff577d2d27da22b37bd1541ad6047585f44bdc14fb9e53568da'; + +# Changing this will log out all existing sessions. +$wgAuthenticationTokenVersion = '1'; + +# Site upgrade key. Must be set to a string (default provided) to turn on the +# web installer while LocalSettings.php is in place +$wgUpgradeKey = 'f05f42e60810b946'; + +## For attaching licensing metadata to pages, and displaying an +## appropriate copyright notice / icon. GNU Free Documentation +## License and Creative Commons licenses are supported so far. +$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright +$wgRightsUrl = ''; +$wgRightsText = ''; +$wgRightsIcon = ""; + +# Path to the GNU diff3 utility. Used for conflict resolution. +$wgDiff3 = '/usr/bin/diff3'; + +## Default skin: you can change the default skin. Use the internal symbolic +## names, e.g. 'vector' or 'monobook': +$wgDefaultSkin = 'vector'; + +# Enabled skins. +# The following skins were automatically enabled: +wfLoadSkin( 'MinervaNeue' ); +wfLoadSkin( 'MonoBook' ); +wfLoadSkin( 'Timeless' ); +wfLoadSkin( 'Vector' ); + + +# End of automatically generated settings. +# Add more configuration options below. + diff --git a/apps/mediawiki/latest/data/data/.gitkeep b/apps/mediawiki/latest/data/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/mediawiki/latest/data/images/.gitkeep b/apps/mediawiki/latest/data/images/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/mediawiki/latest/docker-compose.yml b/apps/mediawiki/latest/docker-compose.yml new file mode 100644 index 00000000..abe2e22e --- /dev/null +++ b/apps/mediawiki/latest/docker-compose.yml @@ -0,0 +1,20 @@ +services: + mediawiki: + image: "mediawiki:latest" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:80" + volumes: + - ${MEDIAWIKI_IMAGES_PATH}:/var/www/html/images + - ${MEDIAWIKI_DATA_PATH}:${INTERNAL_DATA_PATH} + # 以下行前添加#号表示关闭映射,可进行初始化配置生成 + - ${LOCAL_SETTINGS_PATH}:/var/www/html/LocalSettings.php + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mediawiki/latest/scripts/init.sh b/apps/mediawiki/latest/scripts/init.sh new file mode 100644 index 00000000..e6226d6f --- /dev/null +++ b/apps/mediawiki/latest/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R www-data:www-data data \ No newline at end of file diff --git a/apps/mediawiki/logo.png b/apps/mediawiki/logo.png new file mode 100644 index 00000000..f9409aed Binary files /dev/null and b/apps/mediawiki/logo.png differ